...

Package cloudsupport

import "google.golang.org/api/cloudsupport/v2"
Overview
Index

Overview ▾

Package cloudsupport provides access to the Google Cloud Support API.

For product documentation, see: https://cloud.google.com/support/docs/apis

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/cloudsupport/v2"
...
ctx := context.Background()
cloudsupportService, err := cloudsupport.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

cloudsupportService, err := cloudsupport.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
cloudsupportService, err := cloudsupport.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index ▾

Constants
type Actor
    func (s *Actor) MarshalJSON() ([]byte, error)
type Attachment
    func (s *Attachment) MarshalJSON() ([]byte, error)
type Blobstore2Info
    func (s *Blobstore2Info) MarshalJSON() ([]byte, error)
type Case
    func (s *Case) MarshalJSON() ([]byte, error)
type CaseClassification
    func (s *CaseClassification) MarshalJSON() ([]byte, error)
type CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) Context(ctx context.Context) *CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCaseClassificationsResponse, error)
    func (c *CaseClassificationsSearchCall) Fields(s ...googleapi.Field) *CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) Header() http.Header
    func (c *CaseClassificationsSearchCall) IfNoneMatch(entityTag string) *CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) PageSize(pageSize int64) *CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) PageToken(pageToken string) *CaseClassificationsSearchCall
    func (c *CaseClassificationsSearchCall) Pages(ctx context.Context, f func(*SearchCaseClassificationsResponse) error) error
    func (c *CaseClassificationsSearchCall) Query(query string) *CaseClassificationsSearchCall
type CaseClassificationsService
    func NewCaseClassificationsService(s *Service) *CaseClassificationsService
    func (r *CaseClassificationsService) Search() *CaseClassificationsSearchCall
type CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) Context(ctx context.Context) *CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttachmentsResponse, error)
    func (c *CasesAttachmentsListCall) Fields(s ...googleapi.Field) *CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) Header() http.Header
    func (c *CasesAttachmentsListCall) IfNoneMatch(entityTag string) *CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) PageSize(pageSize int64) *CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) PageToken(pageToken string) *CasesAttachmentsListCall
    func (c *CasesAttachmentsListCall) Pages(ctx context.Context, f func(*ListAttachmentsResponse) error) error
type CasesAttachmentsService
    func NewCasesAttachmentsService(s *Service) *CasesAttachmentsService
    func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall
type CasesCloseCall
    func (c *CasesCloseCall) Context(ctx context.Context) *CasesCloseCall
    func (c *CasesCloseCall) Do(opts ...googleapi.CallOption) (*Case, error)
    func (c *CasesCloseCall) Fields(s ...googleapi.Field) *CasesCloseCall
    func (c *CasesCloseCall) Header() http.Header
type CasesCommentsCreateCall
    func (c *CasesCommentsCreateCall) Context(ctx context.Context) *CasesCommentsCreateCall
    func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, error)
    func (c *CasesCommentsCreateCall) Fields(s ...googleapi.Field) *CasesCommentsCreateCall
    func (c *CasesCommentsCreateCall) Header() http.Header
type CasesCommentsListCall
    func (c *CasesCommentsListCall) Context(ctx context.Context) *CasesCommentsListCall
    func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsResponse, error)
    func (c *CasesCommentsListCall) Fields(s ...googleapi.Field) *CasesCommentsListCall
    func (c *CasesCommentsListCall) Header() http.Header
    func (c *CasesCommentsListCall) IfNoneMatch(entityTag string) *CasesCommentsListCall
    func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall
    func (c *CasesCommentsListCall) PageToken(pageToken string) *CasesCommentsListCall
    func (c *CasesCommentsListCall) Pages(ctx context.Context, f func(*ListCommentsResponse) error) error
type CasesCommentsService
    func NewCasesCommentsService(s *Service) *CasesCommentsService
    func (r *CasesCommentsService) Create(parent string, comment *Comment) *CasesCommentsCreateCall
    func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall
type CasesCreateCall
    func (c *CasesCreateCall) Context(ctx context.Context) *CasesCreateCall
    func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error)
    func (c *CasesCreateCall) Fields(s ...googleapi.Field) *CasesCreateCall
    func (c *CasesCreateCall) Header() http.Header
type CasesEscalateCall
    func (c *CasesEscalateCall) Context(ctx context.Context) *CasesEscalateCall
    func (c *CasesEscalateCall) Do(opts ...googleapi.CallOption) (*Case, error)
    func (c *CasesEscalateCall) Fields(s ...googleapi.Field) *CasesEscalateCall
    func (c *CasesEscalateCall) Header() http.Header
type CasesGetCall
    func (c *CasesGetCall) Context(ctx context.Context) *CasesGetCall
    func (c *CasesGetCall) Do(opts ...googleapi.CallOption) (*Case, error)
    func (c *CasesGetCall) Fields(s ...googleapi.Field) *CasesGetCall
    func (c *CasesGetCall) Header() http.Header
    func (c *CasesGetCall) IfNoneMatch(entityTag string) *CasesGetCall
type CasesListCall
    func (c *CasesListCall) Context(ctx context.Context) *CasesListCall
    func (c *CasesListCall) Do(opts ...googleapi.CallOption) (*ListCasesResponse, error)
    func (c *CasesListCall) Fields(s ...googleapi.Field) *CasesListCall
    func (c *CasesListCall) Filter(filter string) *CasesListCall
    func (c *CasesListCall) Header() http.Header
    func (c *CasesListCall) IfNoneMatch(entityTag string) *CasesListCall
    func (c *CasesListCall) PageSize(pageSize int64) *CasesListCall
    func (c *CasesListCall) PageToken(pageToken string) *CasesListCall
    func (c *CasesListCall) Pages(ctx context.Context, f func(*ListCasesResponse) error) error
type CasesPatchCall
    func (c *CasesPatchCall) Context(ctx context.Context) *CasesPatchCall
    func (c *CasesPatchCall) Do(opts ...googleapi.CallOption) (*Case, error)
    func (c *CasesPatchCall) Fields(s ...googleapi.Field) *CasesPatchCall
    func (c *CasesPatchCall) Header() http.Header
    func (c *CasesPatchCall) UpdateMask(updateMask string) *CasesPatchCall
type CasesSearchCall
    func (c *CasesSearchCall) Context(ctx context.Context) *CasesSearchCall
    func (c *CasesSearchCall) Do(opts ...googleapi.CallOption) (*SearchCasesResponse, error)
    func (c *CasesSearchCall) Fields(s ...googleapi.Field) *CasesSearchCall
    func (c *CasesSearchCall) Header() http.Header
    func (c *CasesSearchCall) IfNoneMatch(entityTag string) *CasesSearchCall
    func (c *CasesSearchCall) PageSize(pageSize int64) *CasesSearchCall
    func (c *CasesSearchCall) PageToken(pageToken string) *CasesSearchCall
    func (c *CasesSearchCall) Pages(ctx context.Context, f func(*SearchCasesResponse) error) error
    func (c *CasesSearchCall) Query(query string) *CasesSearchCall
type CasesService
    func NewCasesService(s *Service) *CasesService
    func (r *CasesService) Close(name string, closecaserequest *CloseCaseRequest) *CasesCloseCall
    func (r *CasesService) Create(parent string, case_ *Case) *CasesCreateCall
    func (r *CasesService) Escalate(name string, escalatecaserequest *EscalateCaseRequest) *CasesEscalateCall
    func (r *CasesService) Get(name string) *CasesGetCall
    func (r *CasesService) List(parent string) *CasesListCall
    func (r *CasesService) Patch(name string, case_ *Case) *CasesPatchCall
    func (r *CasesService) Search(parent string) *CasesSearchCall
type CloseCaseRequest
type Comment
    func (s *Comment) MarshalJSON() ([]byte, error)
type CompositeMedia
    func (s *CompositeMedia) MarshalJSON() ([]byte, error)
type ContentTypeInfo
    func (s *ContentTypeInfo) MarshalJSON() ([]byte, error)
type CreateAttachmentRequest
    func (s *CreateAttachmentRequest) MarshalJSON() ([]byte, error)
type DiffChecksumsResponse
    func (s *DiffChecksumsResponse) MarshalJSON() ([]byte, error)
type DiffDownloadResponse
    func (s *DiffDownloadResponse) MarshalJSON() ([]byte, error)
type DiffUploadRequest
    func (s *DiffUploadRequest) MarshalJSON() ([]byte, error)
type DiffUploadResponse
    func (s *DiffUploadResponse) MarshalJSON() ([]byte, error)
type DiffVersionResponse
    func (s *DiffVersionResponse) MarshalJSON() ([]byte, error)
type DownloadParameters
    func (s *DownloadParameters) MarshalJSON() ([]byte, error)
type EscalateCaseRequest
    func (s *EscalateCaseRequest) MarshalJSON() ([]byte, error)
type Escalation
    func (s *Escalation) MarshalJSON() ([]byte, error)
type ListAttachmentsResponse
    func (s *ListAttachmentsResponse) MarshalJSON() ([]byte, error)
type ListCasesResponse
    func (s *ListCasesResponse) MarshalJSON() ([]byte, error)
type ListCommentsResponse
    func (s *ListCommentsResponse) MarshalJSON() ([]byte, error)
type Media
    func (s *Media) MarshalJSON() ([]byte, error)
type MediaDownloadCall
    func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall
    func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error)
    func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)
    func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall
    func (c *MediaDownloadCall) Header() http.Header
    func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall
type MediaService
    func NewMediaService(s *Service) *MediaService
    func (r *MediaService) Download(name string) *MediaDownloadCall
    func (r *MediaService) Upload(parent string, createattachmentrequest *CreateAttachmentRequest) *MediaUploadCall
type MediaUploadCall
    func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall
    func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error)
    func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall
    func (c *MediaUploadCall) Header() http.Header
    func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall
    func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall
    func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall
type ObjectId
    func (s *ObjectId) MarshalJSON() ([]byte, error)
type SearchCaseClassificationsResponse
    func (s *SearchCaseClassificationsResponse) MarshalJSON() ([]byte, error)
type SearchCasesResponse
    func (s *SearchCasesResponse) MarshalJSON() ([]byte, error)
type Service
    func New(client *http.Client) (*Service, error)
    func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)
type WorkflowOperationMetadata
    func (s *WorkflowOperationMetadata) MarshalJSON() ([]byte, error)

Package files

cloudsupport-gen.go

Constants

OAuth2 scopes used by this API.

const (
    // See, edit, configure, and delete your Google Cloud data and see the email
    // address for your Google Account.
    CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

type Actor

Actor: An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case.

type Actor struct {
    // DisplayName: The name to display for the actor. If not provided, it is
    // inferred from credentials supplied during case creation. When an email is
    // provided, a display name must also be provided. This will be obfuscated if
    // the user is a Google Support agent.
    DisplayName string `json:"displayName,omitempty"`
    // Email: The email address of the actor. If not provided, it is inferred from
    // the credentials supplied during case creation. When a name is provided, an
    // email must also be provided. If the user is a Google Support agent, this is
    // obfuscated. This field is deprecated. Use **username** field instead.
    Email string `json:"email,omitempty"`
    // GoogleSupport: Output only. Whether the actor is a Google support actor.
    GoogleSupport bool `json:"googleSupport,omitempty"`
    // Username: Output only. The username of the actor. It may look like an email
    // or other format provided by the identity provider. If not provided, it is
    // inferred from the credentials supplied. When a name is provided, a username
    // must also be provided. If the user is a Google Support agent, this will not
    // be set.
    Username string `json:"username,omitempty"`
    // ForceSendFields is a list of field names (e.g. "DisplayName") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "DisplayName") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Actor) MarshalJSON

func (s *Actor) MarshalJSON() ([]byte, error)

type Attachment

Attachment: An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they're associated on a "case" level, not a "comment" level.

type Attachment struct {
    // CreateTime: Output only. The time at which the attachment was created.
    CreateTime string `json:"createTime,omitempty"`
    // Creator: Output only. The user who uploaded the attachment. Note, the name
    // and email will be obfuscated if the attachment was uploaded by Google
    // support.
    Creator *Actor `json:"creator,omitempty"`
    // Filename: The filename of the attachment (e.g. "graph.jpg").
    Filename string `json:"filename,omitempty"`
    // MimeType: Output only. The MIME type of the attachment (e.g. text/plain).
    MimeType string `json:"mimeType,omitempty"`
    // Name: Output only. The resource name of the attachment.
    Name string `json:"name,omitempty"`
    // SizeBytes: Output only. The size of the attachment in bytes.
    SizeBytes int64 `json:"sizeBytes,omitempty,string"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "CreateTime") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "CreateTime") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Attachment) MarshalJSON

func (s *Attachment) MarshalJSON() ([]byte, error)

type Blobstore2Info

Blobstore2Info: # gdata.* are outside protos with mising documentation

type Blobstore2Info struct {
    // BlobGeneration: # gdata.* are outside protos with mising documentation
    BlobGeneration int64 `json:"blobGeneration,omitempty,string"`
    // BlobId: # gdata.* are outside protos with mising documentation
    BlobId string `json:"blobId,omitempty"`
    // DownloadReadHandle: # gdata.* are outside protos with mising documentation
    DownloadReadHandle string `json:"downloadReadHandle,omitempty"`
    // ReadToken: # gdata.* are outside protos with mising documentation
    ReadToken string `json:"readToken,omitempty"`
    // UploadMetadataContainer: # gdata.* are outside protos with mising
    // documentation
    UploadMetadataContainer string `json:"uploadMetadataContainer,omitempty"`
    // ForceSendFields is a list of field names (e.g. "BlobGeneration") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "BlobGeneration") to include in
    // API requests with the JSON null value. By default, fields with empty values
    // are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Blobstore2Info) MarshalJSON

func (s *Blobstore2Info) MarshalJSON() ([]byte, error)

type Case

Case: A Case is an object that contains the details of a support case. It contains fields for the time it was created, its priority, its classification, and more. Cases can also have comments and attachments that get added over time. A case is parented by a Google Cloud organization or project. Organizations are identified by a number, so the name of a case parented by an organization would look like this: ``` organizations/123/cases/456 ``` Projects have two unique identifiers, an ID and a number, and they look like this: ``` projects/abc/cases/456 ``` ``` projects/123/cases/456 ``` You can use either of them when calling the API. To learn more about project identifiers, see AIP-2510 (https://google.aip.dev/cloud/2510).

type Case struct {
    // Classification: The issue classification applicable to this case.
    Classification *CaseClassification `json:"classification,omitempty"`
    // ContactEmail: A user-supplied email address to send case update
    // notifications for. This should only be used in BYOID flows, where we cannot
    // infer the user's email address directly from their EUCs.
    ContactEmail string `json:"contactEmail,omitempty"`
    // CreateTime: Output only. The time this case was created.
    CreateTime string `json:"createTime,omitempty"`
    // Creator: The user who created the case. Note: The name and email will be
    // obfuscated if the case was created by Google Support.
    Creator *Actor `json:"creator,omitempty"`
    // Description: A broad description of the issue.
    Description string `json:"description,omitempty"`
    // DisplayName: The short summary of the issue reported in this case.
    DisplayName string `json:"displayName,omitempty"`
    // Escalated: Whether the case is currently escalated.
    Escalated bool `json:"escalated,omitempty"`
    // LanguageCode: The language the user has requested to receive support in.
    // This should be a BCP 47 language code (e.g., "en", "zh-CN", "zh-TW",
    // "ja", "ko"). If no language or an unsupported language is specified,
    // this field defaults to English (en). Language selection during case creation
    // may affect your available support options. For a list of supported languages
    // and their support working hours, see:
    // https://cloud.google.com/support/docs/language-working-hours
    LanguageCode string `json:"languageCode,omitempty"`
    // Name: The resource name for the case.
    Name string `json:"name,omitempty"`
    // Priority: The priority of this case.
    //
    // Possible values:
    //   "PRIORITY_UNSPECIFIED" - Priority is undefined or has not been set yet.
    //   "P0" - Extreme impact on a production service. Service is hard down.
    //   "P1" - Critical impact on a production service. Service is currently
    // unusable.
    //   "P2" - Severe impact on a production service. Service is usable but
    // greatly impaired.
    //   "P3" - Medium impact on a production service. Service is available, but
    // moderately impaired.
    //   "P4" - General questions or minor issues. Production service is fully
    // available.
    Priority string `json:"priority,omitempty"`
    // State: Output only. The current status of the support case.
    //
    // Possible values:
    //   "STATE_UNSPECIFIED" - Case is in an unknown state.
    //   "NEW" - The case has been created but no one is assigned to work on it
    // yet.
    //   "IN_PROGRESS_GOOGLE_SUPPORT" - The case is currently being handled by
    // Google support.
    //   "ACTION_REQUIRED" - Google is waiting for a response.
    //   "SOLUTION_PROVIDED" - A solution has been offered for the case, but it
    // isn't yet closed.
    //   "CLOSED" - The case has been resolved.
    State string `json:"state,omitempty"`
    // SubscriberEmailAddresses: The email addresses to receive updates on this
    // case.
    SubscriberEmailAddresses []string `json:"subscriberEmailAddresses,omitempty"`
    // TestCase: Whether this case was created for internal API testing and should
    // not be acted on by the support team.
    TestCase bool `json:"testCase,omitempty"`
    // TimeZone: The timezone of the user who created the support case. It should
    // be in a format IANA recognizes: https://www.iana.org/time-zones. There is no
    // additional validation done by the API.
    TimeZone string `json:"timeZone,omitempty"`
    // UpdateTime: Output only. The time this case was last updated.
    UpdateTime string `json:"updateTime,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Classification") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Classification") to include in
    // API requests with the JSON null value. By default, fields with empty values
    // are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Case) MarshalJSON

func (s *Case) MarshalJSON() ([]byte, error)

type CaseClassification

CaseClassification: A Case Classification represents the topic that a case is about. It's very important to use accurate classifications, because they're used to route your cases to specialists who can help you. A classification always has an ID that is its unique identifier. A valid ID is required when creating a case.

type CaseClassification struct {
    // DisplayName: A display name for the classification. The display name is not
    // static and can change. To uniquely and consistently identify
    // classifications, use the `CaseClassification.id` field.
    DisplayName string `json:"displayName,omitempty"`
    // Id: The unique ID for a classification. Must be specified for case creation.
    // To retrieve valid classification IDs for case creation, use
    // `caseClassifications.search`. Classification IDs returned by
    // `caseClassifications.search` are guaranteed to be valid for at least 6
    // months. If a given classification is deactiveated, it will immediately stop
    // being returned. After 6 months, `case.create` requests using the
    // classification ID will fail.
    Id string `json:"id,omitempty"`
    // ForceSendFields is a list of field names (e.g. "DisplayName") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "DisplayName") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*CaseClassification) MarshalJSON

func (s *CaseClassification) MarshalJSON() ([]byte, error)

type CaseClassificationsSearchCall

type CaseClassificationsSearchCall struct {
    // contains filtered or unexported fields
}

func (*CaseClassificationsSearchCall) Context

func (c *CaseClassificationsSearchCall) Context(ctx context.Context) *CaseClassificationsSearchCall

Context sets the context to be used in this call's Do method.

func (*CaseClassificationsSearchCall) Do

func (c *CaseClassificationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCaseClassificationsResponse, error)

Do executes the "cloudsupport.caseClassifications.search" call. Any non-2xx status code is an error. Response headers are in either *SearchCaseClassificationsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CaseClassificationsSearchCall) Fields

func (c *CaseClassificationsSearchCall) Fields(s ...googleapi.Field) *CaseClassificationsSearchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CaseClassificationsSearchCall) Header

func (c *CaseClassificationsSearchCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CaseClassificationsSearchCall) IfNoneMatch

func (c *CaseClassificationsSearchCall) IfNoneMatch(entityTag string) *CaseClassificationsSearchCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*CaseClassificationsSearchCall) PageSize

func (c *CaseClassificationsSearchCall) PageSize(pageSize int64) *CaseClassificationsSearchCall

PageSize sets the optional parameter "pageSize": The maximum number of classifications fetched with each request.

func (*CaseClassificationsSearchCall) PageToken

func (c *CaseClassificationsSearchCall) PageToken(pageToken string) *CaseClassificationsSearchCall

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return. If unspecified, the first page is retrieved.

func (*CaseClassificationsSearchCall) Pages

func (c *CaseClassificationsSearchCall) Pages(ctx context.Context, f func(*SearchCaseClassificationsResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CaseClassificationsSearchCall) Query

func (c *CaseClassificationsSearchCall) Query(query string) *CaseClassificationsSearchCall

Query sets the optional parameter "query": An expression used to filter case classifications. If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter.

type CaseClassificationsService

type CaseClassificationsService struct {
    // contains filtered or unexported fields
}

func NewCaseClassificationsService

func NewCaseClassificationsService(s *Service) *CaseClassificationsService

func (*CaseClassificationsService) Search

func (r *CaseClassificationsService) Search() *CaseClassificationsSearchCall

Search: Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by " > ". For example, "Technical Issue > Compute > Compute Engine". Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=disp lay_name:"*Compute%20Engine*"' ``` Python: ```python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute()) ```

type CasesAttachmentsListCall

type CasesAttachmentsListCall struct {
    // contains filtered or unexported fields
}

func (*CasesAttachmentsListCall) Context

func (c *CasesAttachmentsListCall) Context(ctx context.Context) *CasesAttachmentsListCall

Context sets the context to be used in this call's Do method.

func (*CasesAttachmentsListCall) Do

func (c *CasesAttachmentsListCall) Do(opts ...googleapi.CallOption) (*ListAttachmentsResponse, error)

Do executes the "cloudsupport.cases.attachments.list" call. Any non-2xx status code is an error. Response headers are in either *ListAttachmentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesAttachmentsListCall) Fields

func (c *CasesAttachmentsListCall) Fields(s ...googleapi.Field) *CasesAttachmentsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesAttachmentsListCall) Header

func (c *CasesAttachmentsListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesAttachmentsListCall) IfNoneMatch

func (c *CasesAttachmentsListCall) IfNoneMatch(entityTag string) *CasesAttachmentsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*CasesAttachmentsListCall) PageSize

func (c *CasesAttachmentsListCall) PageSize(pageSize int64) *CasesAttachmentsListCall

PageSize sets the optional parameter "pageSize": The maximum number of attachments fetched with each request. If not provided, the default is 10. The maximum page size that will be returned is 100.

func (*CasesAttachmentsListCall) PageToken

func (c *CasesAttachmentsListCall) PageToken(pageToken string) *CasesAttachmentsListCall

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return. If unspecified, the first page is retrieved.

func (*CasesAttachmentsListCall) Pages

func (c *CasesAttachmentsListCall) Pages(ctx context.Context, f func(*ListAttachmentsResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CasesAttachmentsService

type CasesAttachmentsService struct {
    // contains filtered or unexported fields
}

func NewCasesAttachmentsService

func NewCasesAttachmentsService(s *Service) *CasesAttachmentsService

func (*CasesAttachmentsService) List

func (r *CasesAttachmentsService) List(parent string) *CasesAttachmentsListCall

List: List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = ( supportApiService.cases() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```

- parent: The name of the case for which attachments should be listed.

type CasesCloseCall

type CasesCloseCall struct {
    // contains filtered or unexported fields
}

func (*CasesCloseCall) Context

func (c *CasesCloseCall) Context(ctx context.Context) *CasesCloseCall

Context sets the context to be used in this call's Do method.

func (*CasesCloseCall) Do

func (c *CasesCloseCall) Do(opts ...googleapi.CallOption) (*Case, error)

Do executes the "cloudsupport.cases.close" call. Any non-2xx status code is an error. Response headers are in either *Case.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesCloseCall) Fields

func (c *CasesCloseCall) Fields(s ...googleapi.Field) *CasesCloseCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesCloseCall) Header

func (c *CasesCloseCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CasesCommentsCreateCall

type CasesCommentsCreateCall struct {
    // contains filtered or unexported fields
}

func (*CasesCommentsCreateCall) Context

func (c *CasesCommentsCreateCall) Context(ctx context.Context) *CasesCommentsCreateCall

Context sets the context to be used in this call's Do method.

func (*CasesCommentsCreateCall) Do

func (c *CasesCommentsCreateCall) Do(opts ...googleapi.CallOption) (*Comment, error)

Do executes the "cloudsupport.cases.comments.create" call. Any non-2xx status code is an error. Response headers are in either *Comment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesCommentsCreateCall) Fields

func (c *CasesCommentsCreateCall) Fields(s ...googleapi.Field) *CasesCommentsCreateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesCommentsCreateCall) Header

func (c *CasesCommentsCreateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CasesCommentsListCall

type CasesCommentsListCall struct {
    // contains filtered or unexported fields
}

func (*CasesCommentsListCall) Context

func (c *CasesCommentsListCall) Context(ctx context.Context) *CasesCommentsListCall

Context sets the context to be used in this call's Do method.

func (*CasesCommentsListCall) Do

func (c *CasesCommentsListCall) Do(opts ...googleapi.CallOption) (*ListCommentsResponse, error)

Do executes the "cloudsupport.cases.comments.list" call. Any non-2xx status code is an error. Response headers are in either *ListCommentsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesCommentsListCall) Fields

func (c *CasesCommentsListCall) Fields(s ...googleapi.Field) *CasesCommentsListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesCommentsListCall) Header

func (c *CasesCommentsListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesCommentsListCall) IfNoneMatch

func (c *CasesCommentsListCall) IfNoneMatch(entityTag string) *CasesCommentsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*CasesCommentsListCall) PageSize

func (c *CasesCommentsListCall) PageSize(pageSize int64) *CasesCommentsListCall

PageSize sets the optional parameter "pageSize": The maximum number of comments to fetch. Defaults to 10.

func (*CasesCommentsListCall) PageToken

func (c *CasesCommentsListCall) PageToken(pageToken string) *CasesCommentsListCall

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return. If unspecified, the first page is returned.

func (*CasesCommentsListCall) Pages

func (c *CasesCommentsListCall) Pages(ctx context.Context, f func(*ListCommentsResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CasesCommentsService

type CasesCommentsService struct {
    // contains filtered or unexported fields
}

func NewCasesCommentsService

func NewCasesCommentsService(s *Service) *CasesCommentsService

func (*CasesCommentsService) Create

func (r *CasesCommentsService) Create(parent string, comment *Comment) *CasesCommentsCreateCall

Create: Add a new comment to a case. The comment must have the following fields set: `body`. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = ( supportApiService.cases() .comments() .create( parent="projects/some-project/cases/43595344", body={"body": "This is a test comment."}, ) ) print(request.execute()) ```

- parent: The name of the case to which the comment should be added.

func (*CasesCommentsService) List

func (r *CasesCommentsService) List(parent string) *CasesCommentsListCall

List: List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = ( supportApiService.cases() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```

- parent: The name of the case for which to list comments.

type CasesCreateCall

type CasesCreateCall struct {
    // contains filtered or unexported fields
}

func (*CasesCreateCall) Context

func (c *CasesCreateCall) Context(ctx context.Context) *CasesCreateCall

Context sets the context to be used in this call's Do method.

func (*CasesCreateCall) Do

func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error)

Do executes the "cloudsupport.cases.create" call. Any non-2xx status code is an error. Response headers are in either *Case.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesCreateCall) Fields

func (c *CasesCreateCall) Fields(s ...googleapi.Field) *CasesCreateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesCreateCall) Header

func (c *CasesCreateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CasesEscalateCall

type CasesEscalateCall struct {
    // contains filtered or unexported fields
}

func (*CasesEscalateCall) Context

func (c *CasesEscalateCall) Context(ctx context.Context) *CasesEscalateCall

Context sets the context to be used in this call's Do method.

func (*CasesEscalateCall) Do

func (c *CasesEscalateCall) Do(opts ...googleapi.CallOption) (*Case, error)

Do executes the "cloudsupport.cases.escalate" call. Any non-2xx status code is an error. Response headers are in either *Case.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesEscalateCall) Fields

func (c *CasesEscalateCall) Fields(s ...googleapi.Field) *CasesEscalateCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesEscalateCall) Header

func (c *CasesEscalateCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

type CasesGetCall

type CasesGetCall struct {
    // contains filtered or unexported fields
}

func (*CasesGetCall) Context

func (c *CasesGetCall) Context(ctx context.Context) *CasesGetCall

Context sets the context to be used in this call's Do method.

func (*CasesGetCall) Do

func (c *CasesGetCall) Do(opts ...googleapi.CallOption) (*Case, error)

Do executes the "cloudsupport.cases.get" call. Any non-2xx status code is an error. Response headers are in either *Case.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesGetCall) Fields

func (c *CasesGetCall) Fields(s ...googleapi.Field) *CasesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesGetCall) Header

func (c *CasesGetCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesGetCall) IfNoneMatch

func (c *CasesGetCall) IfNoneMatch(entityTag string) *CasesGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type CasesListCall

type CasesListCall struct {
    // contains filtered or unexported fields
}

func (*CasesListCall) Context

func (c *CasesListCall) Context(ctx context.Context) *CasesListCall

Context sets the context to be used in this call's Do method.

func (*CasesListCall) Do

func (c *CasesListCall) Do(opts ...googleapi.CallOption) (*ListCasesResponse, error)

Do executes the "cloudsupport.cases.list" call. Any non-2xx status code is an error. Response headers are in either *ListCasesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesListCall) Fields

func (c *CasesListCall) Fields(s ...googleapi.Field) *CasesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesListCall) Filter

func (c *CasesListCall) Filter(filter string) *CasesListCall

Filter sets the optional parameter "filter": An expression used to filter cases. If it's an empty string, then no filtering happens. Otherwise, the endpoint returns the cases that match the filter. Expressions use the following fields separated by `AND` and specified with `=`: - `state`: Can be `OPEN` or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - `creator.email`: The email address of the case creator. EXAMPLES: - `state=CLOSED` - `state=OPEN AND creator.email="tester@example.com" - `state=OPEN AND (priority=P0 OR priority=P1)`

func (*CasesListCall) Header

func (c *CasesListCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesListCall) IfNoneMatch

func (c *CasesListCall) IfNoneMatch(entityTag string) *CasesListCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*CasesListCall) PageSize

func (c *CasesListCall) PageSize(pageSize int64) *CasesListCall

PageSize sets the optional parameter "pageSize": The maximum number of cases fetched with each request. Defaults to 10.

func (*CasesListCall) PageToken

func (c *CasesListCall) PageToken(pageToken string) *CasesListCall

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return. If unspecified, the first page is retrieved.

func (*CasesListCall) Pages

func (c *CasesListCall) Pages(ctx context.Context, f func(*ListCasesResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CasesPatchCall

type CasesPatchCall struct {
    // contains filtered or unexported fields
}

func (*CasesPatchCall) Context

func (c *CasesPatchCall) Context(ctx context.Context) *CasesPatchCall

Context sets the context to be used in this call's Do method.

func (*CasesPatchCall) Do

func (c *CasesPatchCall) Do(opts ...googleapi.CallOption) (*Case, error)

Do executes the "cloudsupport.cases.patch" call. Any non-2xx status code is an error. Response headers are in either *Case.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesPatchCall) Fields

func (c *CasesPatchCall) Fields(s ...googleapi.Field) *CasesPatchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesPatchCall) Header

func (c *CasesPatchCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesPatchCall) UpdateMask

func (c *CasesPatchCall) UpdateMask(updateMask string) *CasesPatchCall

UpdateMask sets the optional parameter "updateMask": A list of attributes of the case that should be updated. Supported values are `priority`, `display_name`, and `subscriber_email_addresses`. If no fields are specified, all supported fields are updated. Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and do not provide a value for `subscriber_email_addresses`, then `subscriber_email_addresses` is updated to empty.

type CasesSearchCall

type CasesSearchCall struct {
    // contains filtered or unexported fields
}

func (*CasesSearchCall) Context

func (c *CasesSearchCall) Context(ctx context.Context) *CasesSearchCall

Context sets the context to be used in this call's Do method.

func (*CasesSearchCall) Do

func (c *CasesSearchCall) Do(opts ...googleapi.CallOption) (*SearchCasesResponse, error)

Do executes the "cloudsupport.cases.search" call. Any non-2xx status code is an error. Response headers are in either *SearchCasesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CasesSearchCall) Fields

func (c *CasesSearchCall) Fields(s ...googleapi.Field) *CasesSearchCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*CasesSearchCall) Header

func (c *CasesSearchCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*CasesSearchCall) IfNoneMatch

func (c *CasesSearchCall) IfNoneMatch(entityTag string) *CasesSearchCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

func (*CasesSearchCall) PageSize

func (c *CasesSearchCall) PageSize(pageSize int64) *CasesSearchCall

PageSize sets the optional parameter "pageSize": The maximum number of cases fetched with each request. The default page size is 10.

func (*CasesSearchCall) PageToken

func (c *CasesSearchCall) PageToken(pageToken string) *CasesSearchCall

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return. If unspecified, the first page is retrieved.

func (*CasesSearchCall) Pages

func (c *CasesSearchCall) Pages(ctx context.Context, f func(*SearchCasesResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*CasesSearchCall) Query

func (c *CasesSearchCall) Query(query string) *CasesSearchCall

Query sets the optional parameter "query": An expression used to filter cases. Expressions use the following fields separated by `AND` and specified with `=`: - `organization`: An organization name in the form `organizations/`. - `project`: A project name in the form `projects/`. - `state`: Can be `OPEN` or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - `creator.email`: The email address of the case creator. You must specify either `organization` or `project`. To search across `displayName`, `description`, and comments, use a global restriction with no keyword or operator. For example, "my search". To search only cases updated after a certain date, use `update_time` restricted with that particular date, time, and timezone in ISO datetime format. For example, `update_time>"2020-01-01T00:00:00-05:00". `update_time` only supports the greater than operator (`>`). Examples: - `organization="organizations/123456789" - `project="projects/my-project-id" - `project="projects/123456789" - `organization="organizations/123456789" AND state=CLOSED` - `project="projects/my-project-id" AND creator.email="tester@example.com" - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)`

type CasesService

type CasesService struct {
    Attachments *CasesAttachmentsService

    Comments *CasesCommentsService
    // contains filtered or unexported fields
}

func NewCasesService

func NewCasesService(s *Service) *CasesService

func (*CasesService) Close

func (r *CasesService) Close(name string, closecaserequest *CloseCaseRequest) *CasesCloseCall

Close: Close a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ```

- name: The name of the case to close.

func (*CasesService) Create

func (r *CasesService) Create(parent string, case_ *Case) *CasesCreateCall

Create: Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN 6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().create( parent="projects/some-project", body={ "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN 6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ```

- parent: The name of the parent under which the case should be created.

func (*CasesService) Escalate

func (r *CasesService) Escalate(name string, escalatecaserequest *EscalateCaseRequest) *CasesEscalateCall

Escalate: Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().escalate( name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ```

- name: The name of the case to be escalated.

func (*CasesService) Get

func (r *CasesService) Get(name string) *CasesGetCall

Get: Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ```

- name: The full name of a case to be retrieved.

func (*CasesService) List

func (r *CasesService) List(parent string) *CasesListCall

List: Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().list(parent="projects/some-project") print(request.execute()) ```

- parent: The name of a parent to list cases under.

func (*CasesService) Patch

func (r *CasesService) Patch(name string, case_ *Case) *CasesPatchCall

Patch: Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ```

- name: The resource name for the case.

func (*CasesService) Search

func (r *CasesService) Search(parent string) *CasesSearchCall

Search: Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.cases().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ```

- parent: The name of the parent resource to search for cases under.

type CloseCaseRequest

CloseCaseRequest: The request message for the CloseCase endpoint.

type CloseCaseRequest struct {
}

type Comment

Comment: A comment associated with a support case. Case comments are the primary way for Google Support to communicate with a user who has opened a case. When a user responds to Google Support, the user's responses also appear as comments.

type Comment struct {
    // Body: The full comment body. Maximum of 12800 characters.
    Body string `json:"body,omitempty"`
    // CreateTime: Output only. The time when the comment was created.
    CreateTime string `json:"createTime,omitempty"`
    // Creator: Output only. The user or Google Support agent who created the
    // comment.
    Creator *Actor `json:"creator,omitempty"`
    // Name: Output only. Identifier. The resource name of the comment.
    Name string `json:"name,omitempty"`
    // PlainTextBody: Output only. DEPRECATED. DO NOT USE. A duplicate of the
    // `body` field. This field is only present for legacy reasons.
    PlainTextBody string `json:"plainTextBody,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Body") to unconditionally
    // include in API requests. By default, fields with empty or default values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Body") to include in API requests
    // with the JSON null value. By default, fields with empty values are omitted
    // from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Comment) MarshalJSON

func (s *Comment) MarshalJSON() ([]byte, error)

type CompositeMedia

CompositeMedia: # gdata.* are outside protos with mising documentation

type CompositeMedia struct {
    // BlobRef: # gdata.* are outside protos with mising documentation
    BlobRef string `json:"blobRef,omitempty"`
    // Blobstore2Info: # gdata.* are outside protos with mising documentation
    Blobstore2Info *Blobstore2Info `json:"blobstore2Info,omitempty"`
    // CosmoBinaryReference: # gdata.* are outside protos with mising documentation
    CosmoBinaryReference string `json:"cosmoBinaryReference,omitempty"`
    // Crc32cHash: # gdata.* are outside protos with mising documentation
    Crc32cHash int64 `json:"crc32cHash,omitempty"`
    // Inline: # gdata.* are outside protos with mising documentation
    Inline string `json:"inline,omitempty"`
    // Length: # gdata.* are outside protos with mising documentation
    Length int64 `json:"length,omitempty,string"`
    // Md5Hash: # gdata.* are outside protos with mising documentation
    Md5Hash string `json:"md5Hash,omitempty"`
    // ObjectId: # gdata.* are outside protos with mising documentation
    ObjectId *ObjectId `json:"objectId,omitempty"`
    // Path: # gdata.* are outside protos with mising documentation
    Path string `json:"path,omitempty"`
    // ReferenceType: # gdata.* are outside protos with mising documentation
    //
    // Possible values:
    //   "PATH" - # gdata.* are outside protos with mising documentation
    //   "BLOB_REF" - # gdata.* are outside protos with mising documentation
    //   "INLINE" - # gdata.* are outside protos with mising documentation
    //   "BIGSTORE_REF" - # gdata.* are outside protos with mising documentation
    //   "COSMO_BINARY_REFERENCE" - # gdata.* are outside protos with mising
    // documentation
    ReferenceType string `json:"referenceType,omitempty"`
    // Sha1Hash: # gdata.* are outside protos with mising documentation
    Sha1Hash string `json:"sha1Hash,omitempty"`
    // ForceSendFields is a list of field names (e.g. "BlobRef") to unconditionally
    // include in API requests. By default, fields with empty or default values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "BlobRef") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*CompositeMedia) MarshalJSON

func (s *CompositeMedia) MarshalJSON() ([]byte, error)

type ContentTypeInfo

ContentTypeInfo: # gdata.* are outside protos with mising documentation

type ContentTypeInfo struct {
    // BestGuess: # gdata.* are outside protos with mising documentation
    BestGuess string `json:"bestGuess,omitempty"`
    // FromBytes: # gdata.* are outside protos with mising documentation
    FromBytes string `json:"fromBytes,omitempty"`
    // FromFileName: # gdata.* are outside protos with mising documentation
    FromFileName string `json:"fromFileName,omitempty"`
    // FromHeader: # gdata.* are outside protos with mising documentation
    FromHeader string `json:"fromHeader,omitempty"`
    // FromUrlPath: # gdata.* are outside protos with mising documentation
    FromUrlPath string `json:"fromUrlPath,omitempty"`
    // ForceSendFields is a list of field names (e.g. "BestGuess") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "BestGuess") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*ContentTypeInfo) MarshalJSON

func (s *ContentTypeInfo) MarshalJSON() ([]byte, error)

type CreateAttachmentRequest

CreateAttachmentRequest: The request message for the CreateAttachment endpoint.

type CreateAttachmentRequest struct {
    // Attachment: Required. The attachment to be created.
    Attachment *Attachment `json:"attachment,omitempty"`
    // ForceSendFields is a list of field names (e.g. "Attachment") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Attachment") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*CreateAttachmentRequest) MarshalJSON

func (s *CreateAttachmentRequest) MarshalJSON() ([]byte, error)

type DiffChecksumsResponse

DiffChecksumsResponse: # gdata.* are outside protos with mising documentation

type DiffChecksumsResponse struct {
    // ChecksumsLocation: # gdata.* are outside protos with mising documentation
    ChecksumsLocation *CompositeMedia `json:"checksumsLocation,omitempty"`
    // ChunkSizeBytes: # gdata.* are outside protos with mising documentation
    ChunkSizeBytes int64 `json:"chunkSizeBytes,omitempty,string"`
    // ObjectLocation: # gdata.* are outside protos with mising documentation
    ObjectLocation *CompositeMedia `json:"objectLocation,omitempty"`
    // ObjectSizeBytes: # gdata.* are outside protos with mising documentation
    ObjectSizeBytes int64 `json:"objectSizeBytes,omitempty,string"`
    // ObjectVersion: # gdata.* are outside protos with mising documentation
    ObjectVersion string `json:"objectVersion,omitempty"`
    // ForceSendFields is a list of field names (e.g. "ChecksumsLocation") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "ChecksumsLocation") to include in
    // API requests with the JSON null value. By default, fields with empty values
    // are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DiffChecksumsResponse) MarshalJSON

func (s *DiffChecksumsResponse) MarshalJSON() ([]byte, error)

type DiffDownloadResponse

DiffDownloadResponse: # gdata.* are outside protos with mising documentation

type DiffDownloadResponse struct {
    // ObjectLocation: # gdata.* are outside protos with mising documentation
    ObjectLocation *CompositeMedia `json:"objectLocation,omitempty"`
    // ForceSendFields is a list of field names (e.g. "ObjectLocation") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "ObjectLocation") to include in
    // API requests with the JSON null value. By default, fields with empty values
    // are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DiffDownloadResponse) MarshalJSON

func (s *DiffDownloadResponse) MarshalJSON() ([]byte, error)

type DiffUploadRequest

DiffUploadRequest: # gdata.* are outside protos with mising documentation

type DiffUploadRequest struct {
    // ChecksumsInfo: # gdata.* are outside protos with mising documentation
    ChecksumsInfo *CompositeMedia `json:"checksumsInfo,omitempty"`
    // ObjectInfo: # gdata.* are outside protos with mising documentation
    ObjectInfo *CompositeMedia `json:"objectInfo,omitempty"`
    // ObjectVersion: # gdata.* are outside protos with mising documentation
    ObjectVersion string `json:"objectVersion,omitempty"`
    // ForceSendFields is a list of field names (e.g. "ChecksumsInfo") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "ChecksumsInfo") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DiffUploadRequest) MarshalJSON

func (s *DiffUploadRequest) MarshalJSON() ([]byte, error)

type DiffUploadResponse

DiffUploadResponse: # gdata.* are outside protos with mising documentation

type DiffUploadResponse struct {
    // ObjectVersion: # gdata.* are outside protos with mising documentation
    ObjectVersion string `json:"objectVersion,omitempty"`
    // OriginalObject: # gdata.* are outside protos with mising documentation
    OriginalObject *CompositeMedia `json:"originalObject,omitempty"`
    // ForceSendFields is a list of field names (e.g. "ObjectVersion") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "ObjectVersion") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DiffUploadResponse) MarshalJSON

func (s *DiffUploadResponse) MarshalJSON() ([]byte, error)

type DiffVersionResponse

DiffVersionResponse: # gdata.* are outside protos with mising documentation

type DiffVersionResponse struct {
    // ObjectSizeBytes: # gdata.* are outside protos with mising documentation
    ObjectSizeBytes int64 `json:"objectSizeBytes,omitempty,string"`
    // ObjectVersion: # gdata.* are outside protos with mising documentation
    ObjectVersion string `json:"objectVersion,omitempty"`
    // ForceSendFields is a list of field names (e.g. "ObjectSizeBytes") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "ObjectSizeBytes") to include in
    // API requests with the JSON null value. By default, fields with empty values
    // are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DiffVersionResponse) MarshalJSON

func (s *DiffVersionResponse) MarshalJSON() ([]byte, error)

type DownloadParameters

DownloadParameters: # gdata.* are outside protos with mising documentation

type DownloadParameters struct {
    // AllowGzipCompression: # gdata.* are outside protos with mising documentation
    AllowGzipCompression bool `json:"allowGzipCompression,omitempty"`
    // IgnoreRange: # gdata.* are outside protos with mising documentation
    IgnoreRange bool `json:"ignoreRange,omitempty"`
    // ForceSendFields is a list of field names (e.g. "AllowGzipCompression") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "AllowGzipCompression") to include
    // in API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*DownloadParameters) MarshalJSON

func (s *DownloadParameters) MarshalJSON() ([]byte, error)

type EscalateCaseRequest

EscalateCaseRequest: The request message for the EscalateCase endpoint.

type EscalateCaseRequest struct {
    // Escalation: The escalation information to be sent with the escalation
    // request.
    Escalation *Escalation `json:"escalation,omitempty"`
    // ForceSendFields is a list of field names (e.g. "Escalation") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Escalation") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*EscalateCaseRequest) MarshalJSON

func (s *EscalateCaseRequest) MarshalJSON() ([]byte, error)

type Escalation

Escalation: An escalation of a support case.

type Escalation struct {
    // Justification: Required. A free text description to accompany the `reason`
    // field above. Provides additional context on why the case is being escalated.
    Justification string `json:"justification,omitempty"`
    // Reason: Required. The reason why the Case is being escalated.
    //
    // Possible values:
    //   "REASON_UNSPECIFIED" - The escalation reason is in an unknown state or has
    // not been specified.
    //   "RESOLUTION_TIME" - The case is taking too long to resolve.
    //   "TECHNICAL_EXPERTISE" - The support agent does not have the expertise
    // required to successfully resolve the issue.
    //   "BUSINESS_IMPACT" - The issue is having a significant business impact.
    Reason string `json:"reason,omitempty"`
    // ForceSendFields is a list of field names (e.g. "Justification") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Justification") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Escalation) MarshalJSON

func (s *Escalation) MarshalJSON() ([]byte, error)

type ListAttachmentsResponse

ListAttachmentsResponse: The response message for the ListAttachments endpoint.

type ListAttachmentsResponse struct {
    // Attachments: The list of attachments associated with a case.
    Attachments []*Attachment `json:"attachments,omitempty"`
    // NextPageToken: A token to retrieve the next page of results. Set this in the
    // `page_token` field of subsequent `cases.attachments.list` requests. If
    // unspecified, there are no more results to retrieve.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Attachments") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Attachments") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*ListAttachmentsResponse) MarshalJSON

func (s *ListAttachmentsResponse) MarshalJSON() ([]byte, error)

type ListCasesResponse

ListCasesResponse: The response message for the ListCases endpoint.

type ListCasesResponse struct {
    // Cases: The list of cases associated with the parent after any filters have
    // been applied.
    Cases []*Case `json:"cases,omitempty"`
    // NextPageToken: A token to retrieve the next page of results. Set this in the
    // `page_token` field of subsequent `cases.list` requests. If unspecified,
    // there are no more results to retrieve.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Cases") to unconditionally
    // include in API requests. By default, fields with empty or default values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Cases") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*ListCasesResponse) MarshalJSON

func (s *ListCasesResponse) MarshalJSON() ([]byte, error)

type ListCommentsResponse

ListCommentsResponse: The response message for the ListComments endpoint.

type ListCommentsResponse struct {
    // Comments: List of the comments associated with the case.
    Comments []*Comment `json:"comments,omitempty"`
    // NextPageToken: A token to retrieve the next page of results. Set this in the
    // `page_token` field of subsequent `cases.comments.list` requests. If
    // unspecified, there are no more results to retrieve.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Comments") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Comments") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*ListCommentsResponse) MarshalJSON

func (s *ListCommentsResponse) MarshalJSON() ([]byte, error)

type Media

Media: # gdata.* are outside protos with mising documentation

type Media struct {
    // Algorithm: # gdata.* are outside protos with mising documentation
    Algorithm string `json:"algorithm,omitempty"`
    // BigstoreObjectRef: # gdata.* are outside protos with mising documentation
    BigstoreObjectRef string `json:"bigstoreObjectRef,omitempty"`
    // BlobRef: # gdata.* are outside protos with mising documentation
    BlobRef string `json:"blobRef,omitempty"`
    // Blobstore2Info: # gdata.* are outside protos with mising documentation
    Blobstore2Info *Blobstore2Info `json:"blobstore2Info,omitempty"`
    // CompositeMedia: # gdata.* are outside protos with mising documentation
    CompositeMedia []*CompositeMedia `json:"compositeMedia,omitempty"`
    // ContentType: # gdata.* are outside protos with mising documentation
    ContentType string `json:"contentType,omitempty"`
    // ContentTypeInfo: # gdata.* are outside protos with mising documentation
    ContentTypeInfo *ContentTypeInfo `json:"contentTypeInfo,omitempty"`
    // CosmoBinaryReference: # gdata.* are outside protos with mising documentation
    CosmoBinaryReference string `json:"cosmoBinaryReference,omitempty"`
    // Crc32cHash: # gdata.* are outside protos with mising documentation
    Crc32cHash int64 `json:"crc32cHash,omitempty"`
    // DiffChecksumsResponse: # gdata.* are outside protos with mising
    // documentation
    DiffChecksumsResponse *DiffChecksumsResponse `json:"diffChecksumsResponse,omitempty"`
    // DiffDownloadResponse: # gdata.* are outside protos with mising documentation
    DiffDownloadResponse *DiffDownloadResponse `json:"diffDownloadResponse,omitempty"`
    // DiffUploadRequest: # gdata.* are outside protos with mising documentation
    DiffUploadRequest *DiffUploadRequest `json:"diffUploadRequest,omitempty"`
    // DiffUploadResponse: # gdata.* are outside protos with mising documentation
    DiffUploadResponse *DiffUploadResponse `json:"diffUploadResponse,omitempty"`
    // DiffVersionResponse: # gdata.* are outside protos with mising documentation
    DiffVersionResponse *DiffVersionResponse `json:"diffVersionResponse,omitempty"`
    // DownloadParameters: # gdata.* are outside protos with mising documentation
    DownloadParameters *DownloadParameters `json:"downloadParameters,omitempty"`
    // Filename: # gdata.* are outside protos with mising documentation
    Filename string `json:"filename,omitempty"`
    // Hash: # gdata.* are outside protos with mising documentation
    Hash string `json:"hash,omitempty"`
    // HashVerified: # gdata.* are outside protos with mising documentation
    HashVerified bool `json:"hashVerified,omitempty"`
    // Inline: # gdata.* are outside protos with mising documentation
    Inline string `json:"inline,omitempty"`
    // IsPotentialRetry: # gdata.* are outside protos with mising documentation
    IsPotentialRetry bool `json:"isPotentialRetry,omitempty"`
    // Length: # gdata.* are outside protos with mising documentation
    Length int64 `json:"length,omitempty,string"`
    // Md5Hash: # gdata.* are outside protos with mising documentation
    Md5Hash string `json:"md5Hash,omitempty"`
    // MediaId: # gdata.* are outside protos with mising documentation
    MediaId string `json:"mediaId,omitempty"`
    // ObjectId: # gdata.* are outside protos with mising documentation
    ObjectId *ObjectId `json:"objectId,omitempty"`
    // Path: # gdata.* are outside protos with mising documentation
    Path string `json:"path,omitempty"`
    // ReferenceType: # gdata.* are outside protos with mising documentation
    //
    // Possible values:
    //   "PATH" - # gdata.* are outside protos with mising documentation
    //   "BLOB_REF" - # gdata.* are outside protos with mising documentation
    //   "INLINE" - # gdata.* are outside protos with mising documentation
    //   "GET_MEDIA" - # gdata.* are outside protos with mising documentation
    //   "COMPOSITE_MEDIA" - # gdata.* are outside protos with mising documentation
    //   "BIGSTORE_REF" - # gdata.* are outside protos with mising documentation
    //   "DIFF_VERSION_RESPONSE" - # gdata.* are outside protos with mising
    // documentation
    //   "DIFF_CHECKSUMS_RESPONSE" - # gdata.* are outside protos with mising
    // documentation
    //   "DIFF_DOWNLOAD_RESPONSE" - # gdata.* are outside protos with mising
    // documentation
    //   "DIFF_UPLOAD_REQUEST" - # gdata.* are outside protos with mising
    // documentation
    //   "DIFF_UPLOAD_RESPONSE" - # gdata.* are outside protos with mising
    // documentation
    //   "COSMO_BINARY_REFERENCE" - # gdata.* are outside protos with mising
    // documentation
    //   "ARBITRARY_BYTES" - # gdata.* are outside protos with mising documentation
    ReferenceType string `json:"referenceType,omitempty"`
    // Sha1Hash: # gdata.* are outside protos with mising documentation
    Sha1Hash string `json:"sha1Hash,omitempty"`
    // Sha256Hash: # gdata.* are outside protos with mising documentation
    Sha256Hash string `json:"sha256Hash,omitempty"`
    // Timestamp: # gdata.* are outside protos with mising documentation
    Timestamp uint64 `json:"timestamp,omitempty,string"`
    // Token: # gdata.* are outside protos with mising documentation
    Token string `json:"token,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Algorithm") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Algorithm") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*Media) MarshalJSON

func (s *Media) MarshalJSON() ([]byte, error)

type MediaDownloadCall

type MediaDownloadCall struct {
    // contains filtered or unexported fields
}

func (*MediaDownloadCall) Context

func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall

Context sets the context to be used in this call's Do and Download methods.

func (*MediaDownloadCall) Do

func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error)

Do executes the "cloudsupport.media.download" call. Any non-2xx status code is an error. Response headers are in either *Media.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaDownloadCall) Download

func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)

Download fetches the API endpoint's "media" value, instead of the normal API response value. If the returned error is nil, the Response is guaranteed to have a 2xx status code. Callers must close the Response.Body as usual.

func (*MediaDownloadCall) Fields

func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*MediaDownloadCall) Header

func (c *MediaDownloadCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*MediaDownloadCall) IfNoneMatch

func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall

IfNoneMatch sets an optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request.

type MediaService

type MediaService struct {
    // contains filtered or unexported fields
}

func NewMediaService

func NewMediaService(s *Service) *MediaService

func (*MediaService) Download

func (r *MediaService) Download(name string) *MediaDownloadCall

Download: Download a file attached to a case. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```

- name: The name of the file attachment to download.

func (*MediaService) Upload

func (r *MediaService) Upload(parent string, createattachmentrequest *CreateAttachmentRequest) *MediaUploadCall

Upload: Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachme nt.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?ver sion={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```

type MediaUploadCall

type MediaUploadCall struct {
    // contains filtered or unexported fields
}

func (*MediaUploadCall) Context

func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall

Context sets the context to be used in this call's Do method. This context will supersede any context previously provided to the ResumableMedia method.

func (*MediaUploadCall) Do

func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*Attachment, error)

Do executes the "cloudsupport.media.upload" call. Any non-2xx status code is an error. Response headers are in either *Attachment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaUploadCall) Fields

func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more details.

func (*MediaUploadCall) Header

func (c *MediaUploadCall) Header() http.Header

Header returns a http.Header that can be modified by the caller to add headers to the request.

func (*MediaUploadCall) Media

func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall

Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.

func (*MediaUploadCall) ProgressUpdater

func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall

ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).

func (*MediaUploadCall) ResumableMedia

func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall

ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.

Deprecated: use Media instead.

At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.

type ObjectId

ObjectId: # gdata.* are outside protos with mising documentation

type ObjectId struct {
    // BucketName: # gdata.* are outside protos with mising documentation
    BucketName string `json:"bucketName,omitempty"`
    // Generation: # gdata.* are outside protos with mising documentation
    Generation int64 `json:"generation,omitempty,string"`
    // ObjectName: # gdata.* are outside protos with mising documentation
    ObjectName string `json:"objectName,omitempty"`
    // ForceSendFields is a list of field names (e.g. "BucketName") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "BucketName") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*ObjectId) MarshalJSON

func (s *ObjectId) MarshalJSON() ([]byte, error)

type SearchCaseClassificationsResponse

SearchCaseClassificationsResponse: The response message for SearchCaseClassifications endpoint.

type SearchCaseClassificationsResponse struct {
    // CaseClassifications: The classifications retrieved.
    CaseClassifications []*CaseClassification `json:"caseClassifications,omitempty"`
    // NextPageToken: A token to retrieve the next page of results. Set this in the
    // `page_token` field of subsequent `caseClassifications.list` requests. If
    // unspecified, there are no more results to retrieve.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "CaseClassifications") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "CaseClassifications") to include
    // in API requests with the JSON null value. By default, fields with empty
    // values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*SearchCaseClassificationsResponse) MarshalJSON

func (s *SearchCaseClassificationsResponse) MarshalJSON() ([]byte, error)

type SearchCasesResponse

SearchCasesResponse: The response message for the SearchCases endpoint.

type SearchCasesResponse struct {
    // Cases: The list of cases associated with the parent after any filters have
    // been applied.
    Cases []*Case `json:"cases,omitempty"`
    // NextPageToken: A token to retrieve the next page of results. Set this in the
    // `page_token` field of subsequent `cases.search` requests. If unspecified,
    // there are no more results to retrieve.
    NextPageToken string `json:"nextPageToken,omitempty"`

    // ServerResponse contains the HTTP response code and headers from the server.
    googleapi.ServerResponse `json:"-"`
    // ForceSendFields is a list of field names (e.g. "Cases") to unconditionally
    // include in API requests. By default, fields with empty or default values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Cases") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*SearchCasesResponse) MarshalJSON

func (s *SearchCasesResponse) MarshalJSON() ([]byte, error)

type Service

type Service struct {
    BasePath  string // API endpoint base URL
    UserAgent string // optional additional User-Agent fragment

    CaseClassifications *CaseClassificationsService

    Cases *CasesService

    Media *MediaService
    // contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type WorkflowOperationMetadata

WorkflowOperationMetadata: Metadata about the operation. Used to lookup the current status.

type WorkflowOperationMetadata struct {
    // Namespace: The namespace that the job was scheduled in. Must be included in
    // the workflow metadata so the workflow status can be retrieved.
    Namespace string `json:"namespace,omitempty"`
    // OperationAction: The type of action the operation is classified as.
    //
    // Possible values:
    //   "OPERATION_ACTION_UNSPECIFIED" - Operation action is not specified.
    //   "CREATE_SUPPORT_ACCOUNT" - Operation pertains to the creation of a new
    // support account.
    //   "UPDATE_SUPPORT_ACCOUNT" - Operation pertains to the updating of an
    // existing support account.
    //   "PURCHASE_SUPPORT_ACCOUNT" - Operation pertains to the purchasing of a
    // support plan that may either create or update a support account.
    OperationAction string `json:"operationAction,omitempty"`
    // WorkflowOperationType: Which version of the workflow service this operation
    // came from.
    //
    // Possible values:
    //   "UNKNOWN_OPERATION_TYPE" - Unknown version.
    //   "WORKFLOWS_V1" - Version 1.
    //   "WORKFLOWS_V2" - Version 2.
    WorkflowOperationType string `json:"workflowOperationType,omitempty"`
    // ForceSendFields is a list of field names (e.g. "Namespace") to
    // unconditionally include in API requests. By default, fields with empty or
    // default values are omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
    // details.
    ForceSendFields []string `json:"-"`
    // NullFields is a list of field names (e.g. "Namespace") to include in API
    // requests with the JSON null value. By default, fields with empty values are
    // omitted from API requests. See
    // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
    NullFields []string `json:"-"`
}

func (*WorkflowOperationMetadata) MarshalJSON

func (s *WorkflowOperationMetadata) MarshalJSON() ([]byte, error)