From a383a8c65bcc0a1cb648a1e0f3a4401c6543e65b Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:15:55 -0700 Subject: [PATCH] chore: regenerate chat client --- .../v1/2.0.0/README.md | 4 +- .../api/services/chat/v1/HangoutsChat.java | 1299 +++++++++++++++++ .../services/chat/v1/HangoutsChatScopes.java | 8 + .../chat/v1/model/GoogleChatV1Section.java | 161 ++ .../v1/model/ListSectionItemsResponse.java | 94 ++ .../chat/v1/model/ListSectionsResponse.java | 100 ++ .../api/services/chat/v1/model/Message.java | 6 +- .../chat/v1/model/MoveSectionItemRequest.java | 70 + .../v1/model/MoveSectionItemResponse.java | 67 + .../chat/v1/model/PositionSectionRequest.java | 100 ++ .../v1/model/PositionSectionResponse.java | 67 + .../services/chat/v1/model/SectionItem.java | 94 ++ .../google-api-services-chat/v1/2.0.0/pom.xml | 4 +- clients/google-api-services-chat/v1/README.md | 4 +- 14 files changed, 2069 insertions(+), 9 deletions(-) create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/GoogleChatV1Section.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionItemsResponse.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionsResponse.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemRequest.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemResponse.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionRequest.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionResponse.java create mode 100644 clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/SectionItem.java diff --git a/clients/google-api-services-chat/v1/2.0.0/README.md b/clients/google-api-services-chat/v1/2.0.0/README.md index 653029fcef9..c1d36b26de5 100644 --- a/clients/google-api-services-chat/v1/2.0.0/README.md +++ b/clients/google-api-services-chat/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-chat - v1-rev20260317-2.0.0 + v1-rev20260320-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-chat:v1-rev20260317-2.0.0' + implementation 'com.google.apis:google-api-services-chat:v1-rev20260320-2.0.0' } ``` diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java index 4fc16ff324e..ffc9fcfaa87 100644 --- a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChat.java @@ -7516,6 +7516,1305 @@ public Users users() { */ public class Users { + /** + * An accessor for creating requests from the Sections collection. + * + *

The typical use is:

+ *
+     *   {@code HangoutsChat chat = new HangoutsChat(...);}
+     *   {@code HangoutsChat.Sections.List request = chat.sections().list(parameters ...)}
+     * 
+ * + * @return the resource collection + */ + public Sections sections() { + return new Sections(); + } + + /** + * The "sections" collection of methods. + */ + public class Sections { + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Creates a section in Google + * Chat. Sections help users group conversations and customize the list of spaces displayed in Chat + * navigation panel. Only sections of type `CUSTOM_SECTION` can be created. For details, see [Create + * and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). Requires + * [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat- + * user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.create". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent resource name where the section is created. Format: `users/{user}` + * @param content the {@link com.google.api.services.chat.v1.model.GoogleChatV1Section} + * @return the request + */ + public Create create(java.lang.String parent, com.google.api.services.chat.v1.model.GoogleChatV1Section content) throws java.io.IOException { + Create result = new Create(parent, content); + initialize(result); + return result; + } + + public class Create extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+parent}/sections"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Creates a section in + * Google Chat. Sections help users group conversations and customize the list of spaces displayed + * in Chat navigation panel. Only sections of type `CUSTOM_SECTION` can be created. For details, + * see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.create". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link Create#execute()} method to invoke the remote operation.

{@link + * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent resource name where the section is created. Format: `users/{user}` + * @param content the {@link com.google.api.services.chat.v1.model.GoogleChatV1Section} + * @since 1.13 + */ + protected Create(java.lang.String parent, com.google.api.services.chat.v1.model.GoogleChatV1Section content) { + super(HangoutsChat.this, "POST", REST_PATH, content, com.google.api.services.chat.v1.model.GoogleChatV1Section.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+$"); + } + } + + @Override + public Create set$Xgafv(java.lang.String $Xgafv) { + return (Create) super.set$Xgafv($Xgafv); + } + + @Override + public Create setAccessToken(java.lang.String accessToken) { + return (Create) super.setAccessToken(accessToken); + } + + @Override + public Create setAlt(java.lang.String alt) { + return (Create) super.setAlt(alt); + } + + @Override + public Create setCallback(java.lang.String callback) { + return (Create) super.setCallback(callback); + } + + @Override + public Create setFields(java.lang.String fields) { + return (Create) super.setFields(fields); + } + + @Override + public Create setKey(java.lang.String key) { + return (Create) super.setKey(key); + } + + @Override + public Create setOauthToken(java.lang.String oauthToken) { + return (Create) super.setOauthToken(oauthToken); + } + + @Override + public Create setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Create) super.setPrettyPrint(prettyPrint); + } + + @Override + public Create setQuotaUser(java.lang.String quotaUser) { + return (Create) super.setQuotaUser(quotaUser); + } + + @Override + public Create setUploadType(java.lang.String uploadType) { + return (Create) super.setUploadType(uploadType); + } + + @Override + public Create setUploadProtocol(java.lang.String uploadProtocol) { + return (Create) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent resource name where the section is created. Format: `users/{user}` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent resource name where the section is created. Format: `users/{user}` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent resource name where the section is created. Format: `users/{user}` + */ + public Create setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public Create set(String parameterName, Object value) { + return (Create) super.set(parameterName, value); + } + } + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Deletes a section of type + * `CUSTOM_SECTION`. If the section contains items, such as spaces, the items are moved to Google + * Chat's default sections and are not deleted. For details, see [Create and organize sections in + * Google Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.delete". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the section to delete. Format: `users/{user}/sections/{section}` + * @return the request + */ + public Delete delete(java.lang.String name) throws java.io.IOException { + Delete result = new Delete(name); + initialize(result); + return result; + } + + public class Delete extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+/sections/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Deletes a section of type + * `CUSTOM_SECTION`. If the section contains items, such as spaces, the items are moved to Google + * Chat's default sections and are not deleted. For details, see [Create and organize sections in + * Google Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.delete". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link Delete#execute()} method to invoke the remote operation.

{@link + * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The name of the section to delete. Format: `users/{user}/sections/{section}` + * @since 1.13 + */ + protected Delete(java.lang.String name) { + super(HangoutsChat.this, "DELETE", REST_PATH, null, com.google.api.services.chat.v1.model.Empty.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + } + + @Override + public Delete set$Xgafv(java.lang.String $Xgafv) { + return (Delete) super.set$Xgafv($Xgafv); + } + + @Override + public Delete setAccessToken(java.lang.String accessToken) { + return (Delete) super.setAccessToken(accessToken); + } + + @Override + public Delete setAlt(java.lang.String alt) { + return (Delete) super.setAlt(alt); + } + + @Override + public Delete setCallback(java.lang.String callback) { + return (Delete) super.setCallback(callback); + } + + @Override + public Delete setFields(java.lang.String fields) { + return (Delete) super.setFields(fields); + } + + @Override + public Delete setKey(java.lang.String key) { + return (Delete) super.setKey(key); + } + + @Override + public Delete setOauthToken(java.lang.String oauthToken) { + return (Delete) super.setOauthToken(oauthToken); + } + + @Override + public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Delete) super.setPrettyPrint(prettyPrint); + } + + @Override + public Delete setQuotaUser(java.lang.String quotaUser) { + return (Delete) super.setQuotaUser(quotaUser); + } + + @Override + public Delete setUploadType(java.lang.String uploadType) { + return (Delete) super.setUploadType(uploadType); + } + + @Override + public Delete setUploadProtocol(java.lang.String uploadProtocol) { + return (Delete) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the section to delete. Format: `users/{user}/sections/{section}` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the section to delete. Format: `users/{user}/sections/{section}` + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the section to delete. Format: `users/{user}/sections/{section}` + */ + public Delete setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Delete set(String parameterName, Object value) { + return (Delete) super.set(parameterName, value); + } + } + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Lists sections available to + * the Chat user. Sections help users group their conversations and customize the list of spaces + * displayed in Chat navigation panel. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + * Create a request for the method "sections.list". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent, which is the user resource name that owns this collection of sections. Only + * supports listing sections for the calling user. To refer to the calling user, set one of + * the following: - The `me` alias. For example, `users/me`. - Their Workspace email address. + * For example, `users/user@example.com`. - Their user id. For example, `users/123456789`. + * Format: `users/{user}` + * @return the request + */ + public List list(java.lang.String parent) throws java.io.IOException { + List result = new List(parent); + initialize(result); + return result; + } + + public class List extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+parent}/sections"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Lists sections available + * to the Chat user. Sections help users group their conversations and customize the list of + * spaces displayed in Chat navigation panel. For details, see [Create and organize sections in + * Google Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + * Create a request for the method "sections.list". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link + * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent, which is the user resource name that owns this collection of sections. Only + * supports listing sections for the calling user. To refer to the calling user, set one of + * the following: - The `me` alias. For example, `users/me`. - Their Workspace email address. + * For example, `users/user@example.com`. - Their user id. For example, `users/123456789`. + * Format: `users/{user}` + * @since 1.13 + */ + protected List(java.lang.String parent) { + super(HangoutsChat.this, "GET", REST_PATH, null, com.google.api.services.chat.v1.model.ListSectionsResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public List set$Xgafv(java.lang.String $Xgafv) { + return (List) super.set$Xgafv($Xgafv); + } + + @Override + public List setAccessToken(java.lang.String accessToken) { + return (List) super.setAccessToken(accessToken); + } + + @Override + public List setAlt(java.lang.String alt) { + return (List) super.setAlt(alt); + } + + @Override + public List setCallback(java.lang.String callback) { + return (List) super.setCallback(callback); + } + + @Override + public List setFields(java.lang.String fields) { + return (List) super.setFields(fields); + } + + @Override + public List setKey(java.lang.String key) { + return (List) super.setKey(key); + } + + @Override + public List setOauthToken(java.lang.String oauthToken) { + return (List) super.setOauthToken(oauthToken); + } + + @Override + public List setPrettyPrint(java.lang.Boolean prettyPrint) { + return (List) super.setPrettyPrint(prettyPrint); + } + + @Override + public List setQuotaUser(java.lang.String quotaUser) { + return (List) super.setQuotaUser(quotaUser); + } + + @Override + public List setUploadType(java.lang.String uploadType) { + return (List) super.setUploadType(uploadType); + } + + @Override + public List setUploadProtocol(java.lang.String uploadProtocol) { + return (List) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent, which is the user resource name that owns this collection of + * sections. Only supports listing sections for the calling user. To refer to the calling + * user, set one of the following: - The `me` alias. For example, `users/me`. - Their + * Workspace email address. For example, `users/user@example.com`. - Their user id. For + * example, `users/123456789`. Format: `users/{user}` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent, which is the user resource name that owns this collection of sections. Only + supports listing sections for the calling user. To refer to the calling user, set one of the + following: - The `me` alias. For example, `users/me`. - Their Workspace email address. For example, + `users/user@example.com`. - Their user id. For example, `users/123456789`. Format: `users/{user}` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent, which is the user resource name that owns this collection of + * sections. Only supports listing sections for the calling user. To refer to the calling + * user, set one of the following: - The `me` alias. For example, `users/me`. - Their + * Workspace email address. For example, `users/user@example.com`. - Their user id. For + * example, `users/123456789`. Format: `users/{user}` + */ + public List setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Optional. The maximum number of sections to return. The service may return fewer than + * this value. If unspecified, at most 10 sections will be returned. The maximum value is + * 100. If you use a value more than 100, it's automatically changed to 100. Negative values + * return an `INVALID_ARGUMENT` error. + */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** Optional. The maximum number of sections to return. The service may return fewer than this value. + If unspecified, at most 10 sections will be returned. The maximum value is 100. If you use a value + more than 100, it's automatically changed to 100. Negative values return an `INVALID_ARGUMENT` + error. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** + * Optional. The maximum number of sections to return. The service may return fewer than + * this value. If unspecified, at most 10 sections will be returned. The maximum value is + * 100. If you use a value more than 100, it's automatically changed to 100. Negative values + * return an `INVALID_ARGUMENT` error. + */ + public List setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Optional. A page token, received from a previous list sections call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters provided should match + * the call that provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** Optional. A page token, received from a previous list sections call. Provide this to retrieve the + subsequent page. When paginating, all other parameters provided should match the call that provided + the page token. Passing different values to the other parameters might lead to unexpected results. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * Optional. A page token, received from a previous list sections call. Provide this to + * retrieve the subsequent page. When paginating, all other parameters provided should match + * the call that provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + */ + public List setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + @Override + public List set(String parameterName, Object value) { + return (List) super.set(parameterName, value); + } + } + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Updates a section. Only + * sections of type `CUSTOM_SECTION` can be updated. For details, see [Create and organize sections + * in Google Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.patch". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation. + * + * @param name Identifier. Resource name of the section. For system sections, the section ID is a constant string: + * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - + * DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + * @param content the {@link com.google.api.services.chat.v1.model.GoogleChatV1Section} + * @return the request + */ + public Patch patch(java.lang.String name, com.google.api.services.chat.v1.model.GoogleChatV1Section content) throws java.io.IOException { + Patch result = new Patch(name, content); + initialize(result); + return result; + } + + public class Patch extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+name}"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+/sections/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Updates a section. Only + * sections of type `CUSTOM_SECTION` can be updated. For details, see [Create and organize + * sections in Google Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.patch". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link Patch#execute()} method to invoke the remote operation.

{@link + * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Identifier. Resource name of the section. For system sections, the section ID is a constant string: + * - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - + * DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + * @param content the {@link com.google.api.services.chat.v1.model.GoogleChatV1Section} + * @since 1.13 + */ + protected Patch(java.lang.String name, com.google.api.services.chat.v1.model.GoogleChatV1Section content) { + super(HangoutsChat.this, "PATCH", REST_PATH, content, com.google.api.services.chat.v1.model.GoogleChatV1Section.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + } + + @Override + public Patch set$Xgafv(java.lang.String $Xgafv) { + return (Patch) super.set$Xgafv($Xgafv); + } + + @Override + public Patch setAccessToken(java.lang.String accessToken) { + return (Patch) super.setAccessToken(accessToken); + } + + @Override + public Patch setAlt(java.lang.String alt) { + return (Patch) super.setAlt(alt); + } + + @Override + public Patch setCallback(java.lang.String callback) { + return (Patch) super.setCallback(callback); + } + + @Override + public Patch setFields(java.lang.String fields) { + return (Patch) super.setFields(fields); + } + + @Override + public Patch setKey(java.lang.String key) { + return (Patch) super.setKey(key); + } + + @Override + public Patch setOauthToken(java.lang.String oauthToken) { + return (Patch) super.setOauthToken(oauthToken); + } + + @Override + public Patch setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Patch) super.setPrettyPrint(prettyPrint); + } + + @Override + public Patch setQuotaUser(java.lang.String quotaUser) { + return (Patch) super.setQuotaUser(quotaUser); + } + + @Override + public Patch setUploadType(java.lang.String uploadType) { + return (Patch) super.setUploadType(uploadType); + } + + @Override + public Patch setUploadProtocol(java.lang.String uploadProtocol) { + return (Patch) super.setUploadProtocol(uploadProtocol); + } + + /** + * Identifier. Resource name of the section. For system sections, the section ID is a + * constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct- + * messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Identifier. Resource name of the section. For system sections, the section ID is a constant string: + - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - DEFAULT_SPACES: + `users/{user}/sections/default-spaces` - DEFAULT_APPS: `users/{user}/sections/default-apps` Format: + `users/{user}/sections/{section}` + */ + public java.lang.String getName() { + return name; + } + + /** + * Identifier. Resource name of the section. For system sections, the section ID is a + * constant string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct- + * messages` - DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + */ + public Patch setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + this.name = name; + return this; + } + + /** + * Required. The mask to specify which fields to update. Currently supported field paths: - + * `display_name` + */ + @com.google.api.client.util.Key + private String updateMask; + + /** Required. The mask to specify which fields to update. Currently supported field paths: - + `display_name` + */ + public String getUpdateMask() { + return updateMask; + } + + /** + * Required. The mask to specify which fields to update. Currently supported field paths: - + * `display_name` + */ + public Patch setUpdateMask(String updateMask) { + this.updateMask = updateMask; + return this; + } + + @Override + public Patch set(String parameterName, Object value) { + return (Patch) super.set(parameterName, value); + } + } + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Changes the sort order of a + * section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.position". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link Position#execute()} method to invoke the remote operation. + * + * @param name Required. The resource name of the section to position. Format: `users/{user}/sections/{section}` + * @param content the {@link com.google.api.services.chat.v1.model.PositionSectionRequest} + * @return the request + */ + public Position position(java.lang.String name, com.google.api.services.chat.v1.model.PositionSectionRequest content) throws java.io.IOException { + Position result = new Position(name, content); + initialize(result); + return result; + } + + public class Position extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+name}:position"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+/sections/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Changes the sort order of + * a section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "sections.position". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link Position#execute()} method to invoke the remote operation.

+ * {@link + * Position#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The resource name of the section to position. Format: `users/{user}/sections/{section}` + * @param content the {@link com.google.api.services.chat.v1.model.PositionSectionRequest} + * @since 1.13 + */ + protected Position(java.lang.String name, com.google.api.services.chat.v1.model.PositionSectionRequest content) { + super(HangoutsChat.this, "POST", REST_PATH, content, com.google.api.services.chat.v1.model.PositionSectionResponse.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + } + + @Override + public Position set$Xgafv(java.lang.String $Xgafv) { + return (Position) super.set$Xgafv($Xgafv); + } + + @Override + public Position setAccessToken(java.lang.String accessToken) { + return (Position) super.setAccessToken(accessToken); + } + + @Override + public Position setAlt(java.lang.String alt) { + return (Position) super.setAlt(alt); + } + + @Override + public Position setCallback(java.lang.String callback) { + return (Position) super.setCallback(callback); + } + + @Override + public Position setFields(java.lang.String fields) { + return (Position) super.setFields(fields); + } + + @Override + public Position setKey(java.lang.String key) { + return (Position) super.setKey(key); + } + + @Override + public Position setOauthToken(java.lang.String oauthToken) { + return (Position) super.setOauthToken(oauthToken); + } + + @Override + public Position setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Position) super.setPrettyPrint(prettyPrint); + } + + @Override + public Position setQuotaUser(java.lang.String quotaUser) { + return (Position) super.setQuotaUser(quotaUser); + } + + @Override + public Position setUploadType(java.lang.String uploadType) { + return (Position) super.setUploadType(uploadType); + } + + @Override + public Position setUploadProtocol(java.lang.String uploadProtocol) { + return (Position) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The resource name of the section to position. Format: + * `users/{user}/sections/{section}` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The resource name of the section to position. Format: `users/{user}/sections/{section}` + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The resource name of the section to position. Format: + * `users/{user}/sections/{section}` + */ + public Position setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Position set(String parameterName, Object value) { + return (Position) super.set(parameterName, value); + } + } + + /** + * An accessor for creating requests from the Items collection. + * + *

The typical use is:

+ *
+       *   {@code HangoutsChat chat = new HangoutsChat(...);}
+       *   {@code HangoutsChat.Items.List request = chat.items().list(parameters ...)}
+       * 
+ * + * @return the resource collection + */ + public Items items() { + return new Items(); + } + + /** + * The "items" collection of methods. + */ + public class Items { + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Lists items in a section. + * Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + * Create a request for the method "items.list". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation. + * + * @param parent Required. The parent, which is the section resource name that owns this collection of section items. + * Only supports listing section items for the calling user. When you're filtering by space, + * use the wildcard `-` to search across all sections. For example, + * `users/{user}/sections/-`. Format: `users/{user}/sections/{section}` + * @return the request + */ + public List list(java.lang.String parent) throws java.io.IOException { + List result = new List(parent); + initialize(result); + return result; + } + + public class List extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+parent}/items"; + + private final java.util.regex.Pattern PARENT_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+/sections/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Lists items in a section. + * Only spaces can be section items. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` - + * `https://www.googleapis.com/auth/chat.users.sections.readonly` + * + * Create a request for the method "items.list". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link List#execute()} method to invoke the remote operation.

{@link + * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param parent Required. The parent, which is the section resource name that owns this collection of section items. + * Only supports listing section items for the calling user. When you're filtering by space, + * use the wildcard `-` to search across all sections. For example, + * `users/{user}/sections/-`. Format: `users/{user}/sections/{section}` + * @since 1.13 + */ + protected List(java.lang.String parent) { + super(HangoutsChat.this, "GET", REST_PATH, null, com.google.api.services.chat.v1.model.ListSectionItemsResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public List set$Xgafv(java.lang.String $Xgafv) { + return (List) super.set$Xgafv($Xgafv); + } + + @Override + public List setAccessToken(java.lang.String accessToken) { + return (List) super.setAccessToken(accessToken); + } + + @Override + public List setAlt(java.lang.String alt) { + return (List) super.setAlt(alt); + } + + @Override + public List setCallback(java.lang.String callback) { + return (List) super.setCallback(callback); + } + + @Override + public List setFields(java.lang.String fields) { + return (List) super.setFields(fields); + } + + @Override + public List setKey(java.lang.String key) { + return (List) super.setKey(key); + } + + @Override + public List setOauthToken(java.lang.String oauthToken) { + return (List) super.setOauthToken(oauthToken); + } + + @Override + public List setPrettyPrint(java.lang.Boolean prettyPrint) { + return (List) super.setPrettyPrint(prettyPrint); + } + + @Override + public List setQuotaUser(java.lang.String quotaUser) { + return (List) super.setQuotaUser(quotaUser); + } + + @Override + public List setUploadType(java.lang.String uploadType) { + return (List) super.setUploadType(uploadType); + } + + @Override + public List setUploadProtocol(java.lang.String uploadProtocol) { + return (List) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The parent, which is the section resource name that owns this collection of + * section items. Only supports listing section items for the calling user. When you're + * filtering by space, use the wildcard `-` to search across all sections. For example, + * `users/{user}/sections/-`. Format: `users/{user}/sections/{section}` + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** Required. The parent, which is the section resource name that owns this collection of section + items. Only supports listing section items for the calling user. When you're filtering by space, + use the wildcard `-` to search across all sections. For example, `users/{user}/sections/-`. Format: + `users/{user}/sections/{section}` + */ + public java.lang.String getParent() { + return parent; + } + + /** + * Required. The parent, which is the section resource name that owns this collection of + * section items. Only supports listing section items for the calling user. When you're + * filtering by space, use the wildcard `-` to search across all sections. For example, + * `users/{user}/sections/-`. Format: `users/{user}/sections/{section}` + */ + public List setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^users/[^/]+/sections/[^/]+$"); + } + this.parent = parent; + return this; + } + + /** + * Optional. A query filter. Currently only supports filtering by space. For example, + * `space = spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUMENT` + * error. + */ + @com.google.api.client.util.Key + private java.lang.String filter; + + /** Optional. A query filter. Currently only supports filtering by space. For example, `space = + spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUMENT` error. + */ + public java.lang.String getFilter() { + return filter; + } + + /** + * Optional. A query filter. Currently only supports filtering by space. For example, + * `space = spaces/{space}`. Invalid queries are rejected with an `INVALID_ARGUMENT` + * error. + */ + public List setFilter(java.lang.String filter) { + this.filter = filter; + return this; + } + + /** + * Optional. The maximum number of section items to return. The service may return fewer + * than this value. If unspecified, at most 10 section items will be returned. The maximum + * value is 100. If you use a value more than 100, it's automatically changed to 100. + * Negative values return an `INVALID_ARGUMENT` error. + */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** Optional. The maximum number of section items to return. The service may return fewer than this + value. If unspecified, at most 10 section items will be returned. The maximum value is 100. If you + use a value more than 100, it's automatically changed to 100. Negative values return an + `INVALID_ARGUMENT` error. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** + * Optional. The maximum number of section items to return. The service may return fewer + * than this value. If unspecified, at most 10 section items will be returned. The maximum + * value is 100. If you use a value more than 100, it's automatically changed to 100. + * Negative values return an `INVALID_ARGUMENT` error. + */ + public List setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Optional. A page token, received from a previous list section items call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters provided should + * match the call that provided the page token. Passing different values to the other + * parameters might lead to unexpected results. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** Optional. A page token, received from a previous list section items call. Provide this to retrieve + the subsequent page. When paginating, all other parameters provided should match the call that + provided the page token. Passing different values to the other parameters might lead to unexpected + results. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * Optional. A page token, received from a previous list section items call. Provide this + * to retrieve the subsequent page. When paginating, all other parameters provided should + * match the call that provided the page token. Passing different values to the other + * parameters might lead to unexpected results. + */ + public List setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + @Override + public List set(String parameterName, Object value) { + return (List) super.set(parameterName, value); + } + } + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Moves an item from one + * section to another. For example, if a section contains spaces, this method can be used to move a + * space to a different section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "items.move". + * + * This request holds the parameters needed by the chat server. After setting any optional + * parameters, call the {@link Move#execute()} method to invoke the remote operation. + * + * @param name Required. The resource name of the section item to move. Format: + * `users/{user}/sections/{section}/items/{item}` + * @param content the {@link com.google.api.services.chat.v1.model.MoveSectionItemRequest} + * @return the request + */ + public Move move(java.lang.String name, com.google.api.services.chat.v1.model.MoveSectionItemRequest content) throws java.io.IOException { + Move result = new Move(name, content); + initialize(result); + return result; + } + + public class Move extends HangoutsChatRequest { + + private static final String REST_PATH = "v1/{+name}:move"; + + private final java.util.regex.Pattern NAME_PATTERN = + java.util.regex.Pattern.compile("^users/[^/]+/sections/[^/]+/items/[^/]+$"); + + /** + * [Developer Preview](https://developers.google.com/workspace/preview): Moves an item from one + * section to another. For example, if a section contains spaces, this method can be used to move + * a space to a different section. For details, see [Create and organize sections in Google + * Chat](https://support.google.com/chat/answer/16059854). Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with the [authorization scope](https://developers.google.com/workspace/chat/authenticate- + * authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections` + * + * Create a request for the method "items.move". + * + * This request holds the parameters needed by the the chat server. After setting any optional + * parameters, call the {@link Move#execute()} method to invoke the remote operation.

{@link + * Move#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be + * called to initialize this instance immediately after invoking the constructor.

+ * + * @param name Required. The resource name of the section item to move. Format: + * `users/{user}/sections/{section}/items/{item}` + * @param content the {@link com.google.api.services.chat.v1.model.MoveSectionItemRequest} + * @since 1.13 + */ + protected Move(java.lang.String name, com.google.api.services.chat.v1.model.MoveSectionItemRequest content) { + super(HangoutsChat.this, "POST", REST_PATH, content, com.google.api.services.chat.v1.model.MoveSectionItemResponse.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+/items/[^/]+$"); + } + } + + @Override + public Move set$Xgafv(java.lang.String $Xgafv) { + return (Move) super.set$Xgafv($Xgafv); + } + + @Override + public Move setAccessToken(java.lang.String accessToken) { + return (Move) super.setAccessToken(accessToken); + } + + @Override + public Move setAlt(java.lang.String alt) { + return (Move) super.setAlt(alt); + } + + @Override + public Move setCallback(java.lang.String callback) { + return (Move) super.setCallback(callback); + } + + @Override + public Move setFields(java.lang.String fields) { + return (Move) super.setFields(fields); + } + + @Override + public Move setKey(java.lang.String key) { + return (Move) super.setKey(key); + } + + @Override + public Move setOauthToken(java.lang.String oauthToken) { + return (Move) super.setOauthToken(oauthToken); + } + + @Override + public Move setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Move) super.setPrettyPrint(prettyPrint); + } + + @Override + public Move setQuotaUser(java.lang.String quotaUser) { + return (Move) super.setQuotaUser(quotaUser); + } + + @Override + public Move setUploadType(java.lang.String uploadType) { + return (Move) super.setUploadType(uploadType); + } + + @Override + public Move setUploadProtocol(java.lang.String uploadProtocol) { + return (Move) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The resource name of the section item to move. Format: + * `users/{user}/sections/{section}/items/{item}` + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The resource name of the section item to move. Format: + `users/{user}/sections/{section}/items/{item}` + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The resource name of the section item to move. Format: + * `users/{user}/sections/{section}/items/{item}` + */ + public Move setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^users/[^/]+/sections/[^/]+/items/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Move set(String parameterName, Object value) { + return (Move) super.set(parameterName, value); + } + } + + } + } /** * An accessor for creating requests from the Spaces collection. * diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChatScopes.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChatScopes.java index 5bee9ff126f..2eff8c8ac48 100644 --- a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChatScopes.java +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/HangoutsChatScopes.java @@ -110,6 +110,12 @@ public class HangoutsChatScopes { /** View last read time for Google Chat conversations. */ public static final String CHAT_USERS_READSTATE_READONLY = "https://www.googleapis.com/auth/chat.users.readstate.readonly"; + /** View, create, update, and delete your sections in Google Chat; move and list your section items in Google Chat. */ + public static final String CHAT_USERS_SECTIONS = "https://www.googleapis.com/auth/chat.users.sections"; + + /** View your sections and their section items in Google Chat. */ + public static final String CHAT_USERS_SECTIONS_READONLY = "https://www.googleapis.com/auth/chat.users.sections.readonly"; + /** Read and update your space settings. */ public static final String CHAT_USERS_SPACESETTINGS = "https://www.googleapis.com/auth/chat.users.spacesettings"; @@ -149,6 +155,8 @@ public static java.util.Set all() { set.add(CHAT_SPACES_READONLY); set.add(CHAT_USERS_READSTATE); set.add(CHAT_USERS_READSTATE_READONLY); + set.add(CHAT_USERS_SECTIONS); + set.add(CHAT_USERS_SECTIONS_READONLY); set.add(CHAT_USERS_SPACESETTINGS); return java.util.Collections.unmodifiableSet(set); } diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/GoogleChatV1Section.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/GoogleChatV1Section.java new file mode 100644 index 00000000000..03d6cc2665a --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/GoogleChatV1Section.java @@ -0,0 +1,161 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Represents a [section](https://support.google.com/chat/answer/16059854) in Google Chat. Sections + * help users organize their spaces. There are two types of sections: 1. **System Sections:** These + * are predefined sections managed by Google Chat. Their resource names are fixed, and they cannot + * be created, deleted, or have their `display_name` modified. Examples include: * + * `users/{user}/sections/default-direct-messages` * `users/{user}/sections/default-spaces` * + * `users/{user}/sections/default-apps` 2. **Custom Sections:** These are sections created and + * managed by the user. Creating a custom section using `CreateSection` **requires** a + * `display_name`. Custom sections can be updated using `UpdateSection` and deleted using + * `DeleteSection`. [Developer Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GoogleChatV1Section extends com.google.api.client.json.GenericJson { + + /** + * Optional. The section's display name. Only populated for sections of type `CUSTOM_SECTION`. + * Supports up to 80 characters. Required when creating a `CUSTOM_SECTION`. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String displayName; + + /** + * Identifier. Resource name of the section. For system sections, the section ID is a constant + * string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - + * DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** + * Output only. The order of the section in relation to other sections. Sections with a lower + * `sort_order` value appear before sections with a higher value. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer sortOrder; + + /** + * Required. The type of the section. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String type; + + /** + * Optional. The section's display name. Only populated for sections of type `CUSTOM_SECTION`. + * Supports up to 80 characters. Required when creating a `CUSTOM_SECTION`. + * @return value or {@code null} for none + */ + public java.lang.String getDisplayName() { + return displayName; + } + + /** + * Optional. The section's display name. Only populated for sections of type `CUSTOM_SECTION`. + * Supports up to 80 characters. Required when creating a `CUSTOM_SECTION`. + * @param displayName displayName or {@code null} for none + */ + public GoogleChatV1Section setDisplayName(java.lang.String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Identifier. Resource name of the section. For system sections, the section ID is a constant + * string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - + * DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + * @return value or {@code null} for none + */ + public java.lang.String getName() { + return name; + } + + /** + * Identifier. Resource name of the section. For system sections, the section ID is a constant + * string: - DEFAULT_DIRECT_MESSAGES: `users/{user}/sections/default-direct-messages` - + * DEFAULT_SPACES: `users/{user}/sections/default-spaces` - DEFAULT_APPS: + * `users/{user}/sections/default-apps` Format: `users/{user}/sections/{section}` + * @param name name or {@code null} for none + */ + public GoogleChatV1Section setName(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Output only. The order of the section in relation to other sections. Sections with a lower + * `sort_order` value appear before sections with a higher value. + * @return value or {@code null} for none + */ + public java.lang.Integer getSortOrder() { + return sortOrder; + } + + /** + * Output only. The order of the section in relation to other sections. Sections with a lower + * `sort_order` value appear before sections with a higher value. + * @param sortOrder sortOrder or {@code null} for none + */ + public GoogleChatV1Section setSortOrder(java.lang.Integer sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Required. The type of the section. + * @return value or {@code null} for none + */ + public java.lang.String getType() { + return type; + } + + /** + * Required. The type of the section. + * @param type type or {@code null} for none + */ + public GoogleChatV1Section setType(java.lang.String type) { + this.type = type; + return this; + } + + @Override + public GoogleChatV1Section set(String fieldName, Object value) { + return (GoogleChatV1Section) super.set(fieldName, value); + } + + @Override + public GoogleChatV1Section clone() { + return (GoogleChatV1Section) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionItemsResponse.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionItemsResponse.java new file mode 100644 index 00000000000..1f7702a8f71 --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionItemsResponse.java @@ -0,0 +1,94 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Response message for listing section items. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ListSectionItemsResponse extends com.google.api.client.json.GenericJson { + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String nextPageToken; + + /** + * The section items from the specified section. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List sectionItems; + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @return value or {@code null} for none + */ + public java.lang.String getNextPageToken() { + return nextPageToken; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @param nextPageToken nextPageToken or {@code null} for none + */ + public ListSectionItemsResponse setNextPageToken(java.lang.String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** + * The section items from the specified section. + * @return value or {@code null} for none + */ + public java.util.List getSectionItems() { + return sectionItems; + } + + /** + * The section items from the specified section. + * @param sectionItems sectionItems or {@code null} for none + */ + public ListSectionItemsResponse setSectionItems(java.util.List sectionItems) { + this.sectionItems = sectionItems; + return this; + } + + @Override + public ListSectionItemsResponse set(String fieldName, Object value) { + return (ListSectionItemsResponse) super.set(fieldName, value); + } + + @Override + public ListSectionItemsResponse clone() { + return (ListSectionItemsResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionsResponse.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionsResponse.java new file mode 100644 index 00000000000..583576c4ec9 --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/ListSectionsResponse.java @@ -0,0 +1,100 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Response message for listing sections. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ListSectionsResponse extends com.google.api.client.json.GenericJson { + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String nextPageToken; + + /** + * The sections from the specified user. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List sections; + + static { + // hack to force ProGuard to consider GoogleChatV1Section used, since otherwise it would be stripped out + // see https://github.com/google/google-api-java-client/issues/543 + com.google.api.client.util.Data.nullOf(GoogleChatV1Section.class); + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @return value or {@code null} for none + */ + public java.lang.String getNextPageToken() { + return nextPageToken; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, + * there are no subsequent pages. + * @param nextPageToken nextPageToken or {@code null} for none + */ + public ListSectionsResponse setNextPageToken(java.lang.String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + /** + * The sections from the specified user. + * @return value or {@code null} for none + */ + public java.util.List getSections() { + return sections; + } + + /** + * The sections from the specified user. + * @param sections sections or {@code null} for none + */ + public ListSectionsResponse setSections(java.util.List sections) { + this.sections = sections; + return this; + } + + @Override + public ListSectionsResponse set(String fieldName, Object value) { + return (ListSectionsResponse) super.set(fieldName, value); + } + + @Override + public ListSectionsResponse clone() { + return (ListSectionsResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/Message.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/Message.java index c0b7996f7e1..228c8146ea3 100644 --- a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/Message.java +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/Message.java @@ -203,7 +203,7 @@ public final class Message extends com.google.api.client.json.GenericJson { * Output only. Contains the message `text` with markups added to communicate formatting. This * field might not capture all formatting visible in the UI, but includes the following: * [Markup * syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, - * strikethrough, monospace, monospace block, and bulleted list. * [User + * strikethrough, monospace, monospace block, bulleted list, and block quote. * [User * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using * the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first * string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the @@ -632,7 +632,7 @@ public Message setFallbackText(java.lang.String fallbackText) { * Output only. Contains the message `text` with markups added to communicate formatting. This * field might not capture all formatting visible in the UI, but includes the following: * [Markup * syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, - * strikethrough, monospace, monospace block, and bulleted list. * [User + * strikethrough, monospace, monospace block, bulleted list, and block quote. * [User * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using * the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first * string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the @@ -651,7 +651,7 @@ public java.lang.String getFormattedText() { * Output only. Contains the message `text` with markups added to communicate formatting. This * field might not capture all formatting visible in the UI, but includes the following: * [Markup * syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, - * strikethrough, monospace, monospace block, and bulleted list. * [User + * strikethrough, monospace, monospace block, bulleted list, and block quote. * [User * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using * the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first * string is the URL and the second is the rendered text—for example, ``. * Custom emoji using the diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemRequest.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemRequest.java new file mode 100644 index 00000000000..ee676edee1c --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemRequest.java @@ -0,0 +1,70 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Request message for moving a section item across sections. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class MoveSectionItemRequest extends com.google.api.client.json.GenericJson { + + /** + * Required. The resource name of the section to move the section item to. Format: + * `users/{user}/sections/{section}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String targetSection; + + /** + * Required. The resource name of the section to move the section item to. Format: + * `users/{user}/sections/{section}` + * @return value or {@code null} for none + */ + public java.lang.String getTargetSection() { + return targetSection; + } + + /** + * Required. The resource name of the section to move the section item to. Format: + * `users/{user}/sections/{section}` + * @param targetSection targetSection or {@code null} for none + */ + public MoveSectionItemRequest setTargetSection(java.lang.String targetSection) { + this.targetSection = targetSection; + return this; + } + + @Override + public MoveSectionItemRequest set(String fieldName, Object value) { + return (MoveSectionItemRequest) super.set(fieldName, value); + } + + @Override + public MoveSectionItemRequest clone() { + return (MoveSectionItemRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemResponse.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemResponse.java new file mode 100644 index 00000000000..e89b3606467 --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/MoveSectionItemResponse.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Response message for moving a section item. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class MoveSectionItemResponse extends com.google.api.client.json.GenericJson { + + /** + * The updated section item. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private SectionItem sectionItem; + + /** + * The updated section item. + * @return value or {@code null} for none + */ + public SectionItem getSectionItem() { + return sectionItem; + } + + /** + * The updated section item. + * @param sectionItem sectionItem or {@code null} for none + */ + public MoveSectionItemResponse setSectionItem(SectionItem sectionItem) { + this.sectionItem = sectionItem; + return this; + } + + @Override + public MoveSectionItemResponse set(String fieldName, Object value) { + return (MoveSectionItemResponse) super.set(fieldName, value); + } + + @Override + public MoveSectionItemResponse clone() { + return (MoveSectionItemResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionRequest.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionRequest.java new file mode 100644 index 00000000000..c8a145b5d1b --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionRequest.java @@ -0,0 +1,100 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Request message for positioning a section. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class PositionSectionRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. The relative position of the section in the list of sections. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String relativePosition; + + /** + * Optional. The absolute position of the section in the list of sections. The position must be + * greater than 0. If the position is greater than the number of sections, the section will be + * appended to the end of the list. This operation inserts the section at the given position and + * shifts the original section at that position, and those below it, to the next position. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Integer sortOrder; + + /** + * Optional. The relative position of the section in the list of sections. + * @return value or {@code null} for none + */ + public java.lang.String getRelativePosition() { + return relativePosition; + } + + /** + * Optional. The relative position of the section in the list of sections. + * @param relativePosition relativePosition or {@code null} for none + */ + public PositionSectionRequest setRelativePosition(java.lang.String relativePosition) { + this.relativePosition = relativePosition; + return this; + } + + /** + * Optional. The absolute position of the section in the list of sections. The position must be + * greater than 0. If the position is greater than the number of sections, the section will be + * appended to the end of the list. This operation inserts the section at the given position and + * shifts the original section at that position, and those below it, to the next position. + * @return value or {@code null} for none + */ + public java.lang.Integer getSortOrder() { + return sortOrder; + } + + /** + * Optional. The absolute position of the section in the list of sections. The position must be + * greater than 0. If the position is greater than the number of sections, the section will be + * appended to the end of the list. This operation inserts the section at the given position and + * shifts the original section at that position, and those below it, to the next position. + * @param sortOrder sortOrder or {@code null} for none + */ + public PositionSectionRequest setSortOrder(java.lang.Integer sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + @Override + public PositionSectionRequest set(String fieldName, Object value) { + return (PositionSectionRequest) super.set(fieldName, value); + } + + @Override + public PositionSectionRequest clone() { + return (PositionSectionRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionResponse.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionResponse.java new file mode 100644 index 00000000000..06aaace9eba --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/PositionSectionResponse.java @@ -0,0 +1,67 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * Response message for positioning a section. [Developer + * Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class PositionSectionResponse extends com.google.api.client.json.GenericJson { + + /** + * The updated section. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private GoogleChatV1Section section; + + /** + * The updated section. + * @return value or {@code null} for none + */ + public GoogleChatV1Section getSection() { + return section; + } + + /** + * The updated section. + * @param section section or {@code null} for none + */ + public PositionSectionResponse setSection(GoogleChatV1Section section) { + this.section = section; + return this; + } + + @Override + public PositionSectionResponse set(String fieldName, Object value) { + return (PositionSectionResponse) super.set(fieldName, value); + } + + @Override + public PositionSectionResponse clone() { + return (PositionSectionResponse) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/SectionItem.java b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/SectionItem.java new file mode 100644 index 00000000000..21b46eefec9 --- /dev/null +++ b/clients/google-api-services-chat/v1/2.0.0/com/google/api/services/chat/v1/model/SectionItem.java @@ -0,0 +1,94 @@ +/* + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.chat.v1.model; + +/** + * A user's defined section item. This is used to represent section items, such as spaces, grouped + * under a section. [Developer Preview](https://developers.google.com/workspace/preview). + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Google Chat API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class SectionItem extends com.google.api.client.json.GenericJson { + + /** + * Identifier. The resource name of the section item. Format: + * `users/{user}/sections/{section}/items/{item}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** + * Optional. The space resource name. Format: `spaces/{space}` + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String space; + + /** + * Identifier. The resource name of the section item. Format: + * `users/{user}/sections/{section}/items/{item}` + * @return value or {@code null} for none + */ + public java.lang.String getName() { + return name; + } + + /** + * Identifier. The resource name of the section item. Format: + * `users/{user}/sections/{section}/items/{item}` + * @param name name or {@code null} for none + */ + public SectionItem setName(java.lang.String name) { + this.name = name; + return this; + } + + /** + * Optional. The space resource name. Format: `spaces/{space}` + * @return value or {@code null} for none + */ + public java.lang.String getSpace() { + return space; + } + + /** + * Optional. The space resource name. Format: `spaces/{space}` + * @param space space or {@code null} for none + */ + public SectionItem setSpace(java.lang.String space) { + this.space = space; + return this; + } + + @Override + public SectionItem set(String fieldName, Object value) { + return (SectionItem) super.set(fieldName, value); + } + + @Override + public SectionItem clone() { + return (SectionItem) super.clone(); + } + +} diff --git a/clients/google-api-services-chat/v1/2.0.0/pom.xml b/clients/google-api-services-chat/v1/2.0.0/pom.xml index 9915177ae4b..46aa1bb806a 100644 --- a/clients/google-api-services-chat/v1/2.0.0/pom.xml +++ b/clients/google-api-services-chat/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-chat - v1-rev20260317-2.0.0 - Google Chat API v1-rev20260317-2.0.0 + v1-rev20260320-2.0.0 + Google Chat API v1-rev20260320-2.0.0 jar 2011 diff --git a/clients/google-api-services-chat/v1/README.md b/clients/google-api-services-chat/v1/README.md index 653029fcef9..c1d36b26de5 100644 --- a/clients/google-api-services-chat/v1/README.md +++ b/clients/google-api-services-chat/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-chat - v1-rev20260317-2.0.0 + v1-rev20260320-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-chat:v1-rev20260317-2.0.0' + implementation 'com.google.apis:google-api-services-chat:v1-rev20260320-2.0.0' } ```