accessapproval

package
v0.15.1-0...-796286a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package accessapproval provides access to the Access Approval API.

For product documentation, see: https://cloud.google.com/access-approval/docs

Creating a client

Usage example:

import "google.golang.org/api/accessapproval/v1"
...
ctx := context.Background()
accessapprovalService, err := accessapproval.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 option.WithAPIKey:

accessapprovalService, err := accessapproval.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

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

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessApprovalSettings

type AccessApprovalSettings struct {
	// EnrolledAncestor: Output only. This field is read only (not settable
	// via
	// UpdateAccessAccessApprovalSettings method). If the field is true,
	// that
	// indicates that at least one service is enrolled for Access Approval
	// in one
	// or more ancestors of the Project or Folder (this field will always
	// be
	// unset for the organization since organizations do not have
	// ancestors).
	EnrolledAncestor bool `json:"enrolledAncestor,omitempty"`

	// EnrolledServices: A list of Google Cloud Services for which the given
	// resource has Access
	// Approval enrolled. Access requests for the resource given by name
	// against
	// any of these services contained here will be required to have
	// explicit
	// approval. If name refers to an organization, enrollment can be done
	// for
	// individual services. If name refers to a folder or project,
	// enrollment can
	// only be done on an all or nothing basis.
	//
	// If a cloud_product is repeated in this list, the first entry will
	// be
	// honored and all following entries will be discarded. A maximum of
	// 10
	// enrolled services will be enforced, to be expanded as the set of
	// supported
	// services is expanded.
	EnrolledServices []*EnrolledService `json:"enrolledServices,omitempty"`

	// Name: The resource name of the settings. Format is one of:
	// <ol>
	//   <li>"projects/{project_id}/accessApprovalSettings"</li>
	//   <li>"folders/{folder_id}/accessApprovalSettings"</li>
	//
	// <li>"organizations/{organization_id}/accessApprovalSettings"</li>
	// <ol>
	Name string `json:"name,omitempty"`

	// NotificationEmails: A list of email addresses to which notifications
	// relating to approval
	// requests should be sent. Notifications relating to a resource will be
	// sent
	// to all emails in the settings of ancestor resources of that resource.
	// A
	// maximum of 50 email addresses are allowed.
	NotificationEmails []string `json:"notificationEmails,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "EnrolledAncestor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EnrolledAncestor") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

AccessApprovalSettings: Settings on a Project/Folder/Organization related to Access Approval.

func (*AccessApprovalSettings) MarshalJSON

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

type AccessLocations

type AccessLocations struct {
	// PrincipalOfficeCountry: The "home office" location of the principal.
	// A two-letter country code
	// (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In
	// some
	// limited situations Google systems may refer refer to a region code
	// instead
	// of a country code.
	// Possible Region Codes:
	// <ol>
	//   <li>ASI: Asia</li>
	//   <li>EUR: Europe</li>
	//   <li>OCE: Oceania</li>
	//   <li>AFR: Africa</li>
	//   <li>NAM: North America</li>
	//   <li>SAM: South America</li>
	//   <li>ANT: Antarctica</li>
	//   <li>ANY: Any location</li>
	// </ol>
	PrincipalOfficeCountry string `json:"principalOfficeCountry,omitempty"`

	// PrincipalPhysicalLocationCountry: Physical location of the principal
	// at the time of the access. A
	// two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or
	// "GB" or
	// a region code. In some limited situations Google systems may refer
	// refer to
	// a region code instead of a country code.
	// Possible Region Codes:
	// <ol>
	//   <li>ASI: Asia</li>
	//   <li>EUR: Europe</li>
	//   <li>OCE: Oceania</li>
	//   <li>AFR: Africa</li>
	//   <li>NAM: North America</li>
	//   <li>SAM: South America</li>
	//   <li>ANT: Antarctica</li>
	//   <li>ANY: Any location</li>
	// </ol>
	PrincipalPhysicalLocationCountry string `json:"principalPhysicalLocationCountry,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "PrincipalOfficeCountry") to unconditionally include in API requests.
	// By default, fields with empty values are omitted from API requests.
	// However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PrincipalOfficeCountry")
	// to include in API requests with the JSON null value. By default,
	// fields with empty values are omitted from API requests. However, any
	// field with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

AccessLocations: Home office and physical location of the principal.

func (*AccessLocations) MarshalJSON

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

type AccessReason

type AccessReason struct {
	// Detail: More detail about certain reason types. See comments for each
	// type above.
	Detail string `json:"detail,omitempty"`

	// Type: Type of access justification.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default value for proto, shouldn't be used.
	//   "CUSTOMER_INITIATED_SUPPORT" - Customer made a request or raised an
	// issue that required the principal to
	// access customer data. `detail` is of the form ("#####" is the issue
	// ID):
	// <ol>
	//   <li>"Feedback Report: #####"</li>
	//   <li>"Case Number: #####"</li>
	//   <li>"Case ID: #####"</li>
	//   <li>"E-PIN Reference: #####"</li>
	//   <li>"Google-#####"</li>
	//   <li>"T-#####"</li>
	// </ol>
	//   "GOOGLE_INITIATED_SERVICE" - The principal accessed customer data
	// in order to diagnose or resolve a
	// suspected issue in services or a known outage. Often this access is
	// used
	// to confirm that customers are not affected by a suspected service
	// issue
	// or to remediate a reversible system issue.
	//   "GOOGLE_INITIATED_REVIEW" - Google initiated service for security,
	// fraud, abuse, or compliance
	// purposes.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Detail") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Detail") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*AccessReason) MarshalJSON

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

type ApprovalRequest

type ApprovalRequest struct {
	// Approve: Access was approved.
	Approve *ApproveDecision `json:"approve,omitempty"`

	// Dismiss: The request was dismissed.
	Dismiss *DismissDecision `json:"dismiss,omitempty"`

	// Name: The resource name of the request. Format
	// is
	// "{projects|folders|organizations}/{id}/approvalRequests/{approval_r
	// equest_id}".
	Name string `json:"name,omitempty"`

	// RequestTime: The time at which approval was requested.
	RequestTime string `json:"requestTime,omitempty"`

	// RequestedExpiration: The requested expiration for the approval. If
	// the request is approved,
	// access will be granted from the time of approval until the expiration
	// time.
	RequestedExpiration string `json:"requestedExpiration,omitempty"`

	// RequestedLocations: The locations for which approval is being
	// requested.
	RequestedLocations *AccessLocations `json:"requestedLocations,omitempty"`

	// RequestedReason: The justification for which approval is being
	// requested.
	RequestedReason *AccessReason `json:"requestedReason,omitempty"`

	// RequestedResourceName: The resource for which approval is being
	// requested. The format of the
	// resource name is defined
	// at
	// https://cloud.google.com/apis/design/resource_names. The resource
	// name here
	// may either be a "full" resource name
	// (e.g.
	// "//library.googleapis.com/shelves/shelf1/books/book2") or a
	// "relative"
	// resource name (e.g. "shelves/shelf1/books/book2") as described in
	// the
	// resource name specification.
	RequestedResourceName string `json:"requestedResourceName,omitempty"`

	// RequestedResourceProperties: Properties related to the resource
	// represented by requested_resource_name.
	RequestedResourceProperties *ResourceProperties `json:"requestedResourceProperties,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Approve") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Approve") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ApprovalRequest: A request for the customer to approve access to a resource.

func (*ApprovalRequest) MarshalJSON

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

type ApproveApprovalRequestMessage

type ApproveApprovalRequestMessage struct {
	// ExpireTime: The expiration time of this approval.
	ExpireTime string `json:"expireTime,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ExpireTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ExpireTime") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ApproveApprovalRequestMessage: Request to approve an ApprovalRequest.

func (*ApproveApprovalRequestMessage) MarshalJSON

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

type ApproveDecision

type ApproveDecision struct {
	// ApproveTime: The time at which approval was granted.
	ApproveTime string `json:"approveTime,omitempty"`

	// ExpireTime: The time at which the approval expires.
	ExpireTime string `json:"expireTime,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ApproveTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ApproveTime") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ApproveDecision: A decision that has been made to approve access to a resource.

func (*ApproveDecision) MarshalJSON

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

type DismissApprovalRequestMessage

type DismissApprovalRequestMessage struct {
}

DismissApprovalRequestMessage: Request to dismiss an approval request.

type DismissDecision

type DismissDecision struct {
	// DismissTime: The time at which the approval request was dismissed.
	DismissTime string `json:"dismissTime,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DismissTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DismissTime") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DismissDecision: A decision that has been made to dismiss an approval request.

func (*DismissDecision) MarshalJSON

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

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo {
  rpc Bar(google.protobuf.Empty) returns

(google.protobuf.Empty);

}

The JSON representation for `Empty` is empty JSON object `{}`.

type EnrolledService

type EnrolledService struct {
	// CloudProduct: The product for which Access Approval will be enrolled.
	// Allowed values are
	// listed below (case-sensitive):
	// <ol>
	//   <li>all</li>
	//   <li>appengine.googleapis.com</li>
	//   <li>bigquery.googleapis.com</li>
	//   <li>bigtable.googleapis.com</li>
	//   <li>cloudkms.googleapis.com</li>
	//   <li>compute.googleapis.com</li>
	//   <li>dataflow.googleapis.com</li>
	//   <li>iam.googleapis.com</li>
	//   <li>pubsub.googleapis.com</li>
	//   <li>storage.googleapis.com</li>
	// <ol>
	CloudProduct string `json:"cloudProduct,omitempty"`

	// EnrollmentLevel: The enrollment level of the service.
	//
	// Possible values:
	//   "ENROLLMENT_LEVEL_UNSPECIFIED" - Default value for proto, shouldn't
	// be used.
	//   "BLOCK_ALL" - Service is enrolled in Access Approval for all
	// requests
	EnrollmentLevel string `json:"enrollmentLevel,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CloudProduct") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CloudProduct") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

EnrolledService: Represents the enrollment of a cloud resource into a specific service.

func (*EnrolledService) MarshalJSON

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

type FoldersApprovalRequestsApproveCall

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

func (*FoldersApprovalRequestsApproveCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersApprovalRequestsApproveCall) Do

Do executes the "accessapproval.folders.approvalRequests.approve" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*FoldersApprovalRequestsApproveCall) Fields

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

func (*FoldersApprovalRequestsApproveCall) Header

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

type FoldersApprovalRequestsDismissCall

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

func (*FoldersApprovalRequestsDismissCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersApprovalRequestsDismissCall) Do

Do executes the "accessapproval.folders.approvalRequests.dismiss" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*FoldersApprovalRequestsDismissCall) Fields

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

func (*FoldersApprovalRequestsDismissCall) Header

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

type FoldersApprovalRequestsGetCall

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

func (*FoldersApprovalRequestsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersApprovalRequestsGetCall) Do

Do executes the "accessapproval.folders.approvalRequests.get" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*FoldersApprovalRequestsGetCall) Fields

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

func (*FoldersApprovalRequestsGetCall) Header

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

func (*FoldersApprovalRequestsGetCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type FoldersApprovalRequestsListCall

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

func (*FoldersApprovalRequestsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersApprovalRequestsListCall) Do

Do executes the "accessapproval.folders.approvalRequests.list" call. Exactly one of *ListApprovalRequestsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListApprovalRequestsResponse.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 (*FoldersApprovalRequestsListCall) Fields

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

func (*FoldersApprovalRequestsListCall) Filter

Filter sets the optional parameter "filter": A filter on the type of approval requests to retrieve. Must be one of the following values: <ol>

<li>[not set]: Requests that are pending or have active

approvals.</li>

<li>ALL: All requests.</li>
<li>PENDING: Only pending requests.</li>
<li>ACTIVE: Only active (i.e. currently approved) requests.</li>
<li>DISMISSED: Only dismissed (including expired)

requests.</li> </ol>

func (*FoldersApprovalRequestsListCall) Header

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

func (*FoldersApprovalRequestsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*FoldersApprovalRequestsListCall) PageSize

PageSize sets the optional parameter "pageSize": Requested page size.

func (*FoldersApprovalRequestsListCall) PageToken

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return.

func (*FoldersApprovalRequestsListCall) Pages

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 FoldersApprovalRequestsService

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

func NewFoldersApprovalRequestsService

func NewFoldersApprovalRequestsService(s *Service) *FoldersApprovalRequestsService

func (*FoldersApprovalRequestsService) Approve

Approve: Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*FoldersApprovalRequestsService) Dismiss

Dismiss: Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*FoldersApprovalRequestsService) Get

Get: Gets an approval request. Returns NOT_FOUND if the request does not exist.

func (*FoldersApprovalRequestsService) List

List: Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

type FoldersDeleteAccessApprovalSettingsCall

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

func (*FoldersDeleteAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersDeleteAccessApprovalSettingsCall) Do

Do executes the "accessapproval.folders.deleteAccessApprovalSettings" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*FoldersDeleteAccessApprovalSettingsCall) Fields

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

func (*FoldersDeleteAccessApprovalSettingsCall) Header

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

type FoldersGetAccessApprovalSettingsCall

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

func (*FoldersGetAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersGetAccessApprovalSettingsCall) Do

Do executes the "accessapproval.folders.getAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*FoldersGetAccessApprovalSettingsCall) Fields

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

func (*FoldersGetAccessApprovalSettingsCall) Header

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

func (*FoldersGetAccessApprovalSettingsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type FoldersService

type FoldersService struct {
	ApprovalRequests *FoldersApprovalRequestsService
	// contains filtered or unexported fields
}

func NewFoldersService

func NewFoldersService(s *Service) *FoldersService

func (*FoldersService) DeleteAccessApprovalSettings

func (r *FoldersService) DeleteAccessApprovalSettings(name string) *FoldersDeleteAccessApprovalSettingsCall

DeleteAccessApprovalSettings: Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

func (*FoldersService) GetAccessApprovalSettings

func (r *FoldersService) GetAccessApprovalSettings(name string) *FoldersGetAccessApprovalSettingsCall

GetAccessApprovalSettings: Gets the settings associated with a project, folder, or organization.

func (*FoldersService) UpdateAccessApprovalSettings

func (r *FoldersService) UpdateAccessApprovalSettings(name string, accessapprovalsettings *AccessApprovalSettings) *FoldersUpdateAccessApprovalSettingsCall

UpdateAccessApprovalSettings: Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

type FoldersUpdateAccessApprovalSettingsCall

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

func (*FoldersUpdateAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*FoldersUpdateAccessApprovalSettingsCall) Do

Do executes the "accessapproval.folders.updateAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*FoldersUpdateAccessApprovalSettingsCall) Fields

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

func (*FoldersUpdateAccessApprovalSettingsCall) Header

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

func (*FoldersUpdateAccessApprovalSettingsCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/goog le.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

type ListApprovalRequestsResponse

type ListApprovalRequestsResponse struct {
	// ApprovalRequests: Approval request details.
	ApprovalRequests []*ApprovalRequest `json:"approvalRequests,omitempty"`

	// NextPageToken: Token to retrieve the next page of results, or empty
	// if there are no more.
	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. "ApprovalRequests") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ApprovalRequests") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ListApprovalRequestsResponse: Response to listing of ApprovalRequest objects.

func (*ListApprovalRequestsResponse) MarshalJSON

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

type OrganizationsApprovalRequestsApproveCall

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

func (*OrganizationsApprovalRequestsApproveCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsApprovalRequestsApproveCall) Do

Do executes the "accessapproval.organizations.approvalRequests.approve" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*OrganizationsApprovalRequestsApproveCall) Fields

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

func (*OrganizationsApprovalRequestsApproveCall) Header

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

type OrganizationsApprovalRequestsDismissCall

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

func (*OrganizationsApprovalRequestsDismissCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsApprovalRequestsDismissCall) Do

Do executes the "accessapproval.organizations.approvalRequests.dismiss" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*OrganizationsApprovalRequestsDismissCall) Fields

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

func (*OrganizationsApprovalRequestsDismissCall) Header

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

type OrganizationsApprovalRequestsGetCall

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

func (*OrganizationsApprovalRequestsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsApprovalRequestsGetCall) Do

Do executes the "accessapproval.organizations.approvalRequests.get" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*OrganizationsApprovalRequestsGetCall) Fields

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

func (*OrganizationsApprovalRequestsGetCall) Header

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

func (*OrganizationsApprovalRequestsGetCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type OrganizationsApprovalRequestsListCall

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

func (*OrganizationsApprovalRequestsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsApprovalRequestsListCall) Do

Do executes the "accessapproval.organizations.approvalRequests.list" call. Exactly one of *ListApprovalRequestsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListApprovalRequestsResponse.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 (*OrganizationsApprovalRequestsListCall) Fields

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

func (*OrganizationsApprovalRequestsListCall) Filter

Filter sets the optional parameter "filter": A filter on the type of approval requests to retrieve. Must be one of the following values: <ol>

<li>[not set]: Requests that are pending or have active

approvals.</li>

<li>ALL: All requests.</li>
<li>PENDING: Only pending requests.</li>
<li>ACTIVE: Only active (i.e. currently approved) requests.</li>
<li>DISMISSED: Only dismissed (including expired)

requests.</li> </ol>

func (*OrganizationsApprovalRequestsListCall) Header

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

func (*OrganizationsApprovalRequestsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*OrganizationsApprovalRequestsListCall) PageSize

PageSize sets the optional parameter "pageSize": Requested page size.

func (*OrganizationsApprovalRequestsListCall) PageToken

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return.

func (*OrganizationsApprovalRequestsListCall) Pages

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 OrganizationsApprovalRequestsService

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

func NewOrganizationsApprovalRequestsService

func NewOrganizationsApprovalRequestsService(s *Service) *OrganizationsApprovalRequestsService

func (*OrganizationsApprovalRequestsService) Approve

Approve: Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*OrganizationsApprovalRequestsService) Dismiss

Dismiss: Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*OrganizationsApprovalRequestsService) Get

Get: Gets an approval request. Returns NOT_FOUND if the request does not exist.

func (*OrganizationsApprovalRequestsService) List

List: Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

type OrganizationsDeleteAccessApprovalSettingsCall

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

func (*OrganizationsDeleteAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsDeleteAccessApprovalSettingsCall) Do

Do executes the "accessapproval.organizations.deleteAccessApprovalSettings" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*OrganizationsDeleteAccessApprovalSettingsCall) Fields

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

func (*OrganizationsDeleteAccessApprovalSettingsCall) Header

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

type OrganizationsGetAccessApprovalSettingsCall

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

func (*OrganizationsGetAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsGetAccessApprovalSettingsCall) Do

Do executes the "accessapproval.organizations.getAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*OrganizationsGetAccessApprovalSettingsCall) Fields

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

func (*OrganizationsGetAccessApprovalSettingsCall) Header

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

func (*OrganizationsGetAccessApprovalSettingsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type OrganizationsService

type OrganizationsService struct {
	ApprovalRequests *OrganizationsApprovalRequestsService
	// contains filtered or unexported fields
}

func NewOrganizationsService

func NewOrganizationsService(s *Service) *OrganizationsService

func (*OrganizationsService) DeleteAccessApprovalSettings

func (r *OrganizationsService) DeleteAccessApprovalSettings(name string) *OrganizationsDeleteAccessApprovalSettingsCall

DeleteAccessApprovalSettings: Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

func (*OrganizationsService) GetAccessApprovalSettings

func (r *OrganizationsService) GetAccessApprovalSettings(name string) *OrganizationsGetAccessApprovalSettingsCall

GetAccessApprovalSettings: Gets the settings associated with a project, folder, or organization.

func (*OrganizationsService) UpdateAccessApprovalSettings

func (r *OrganizationsService) UpdateAccessApprovalSettings(name string, accessapprovalsettings *AccessApprovalSettings) *OrganizationsUpdateAccessApprovalSettingsCall

UpdateAccessApprovalSettings: Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

type OrganizationsUpdateAccessApprovalSettingsCall

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

func (*OrganizationsUpdateAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*OrganizationsUpdateAccessApprovalSettingsCall) Do

Do executes the "accessapproval.organizations.updateAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*OrganizationsUpdateAccessApprovalSettingsCall) Fields

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

func (*OrganizationsUpdateAccessApprovalSettingsCall) Header

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

func (*OrganizationsUpdateAccessApprovalSettingsCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/goog le.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

type ProjectsApprovalRequestsApproveCall

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

func (*ProjectsApprovalRequestsApproveCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsApprovalRequestsApproveCall) Do

Do executes the "accessapproval.projects.approvalRequests.approve" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*ProjectsApprovalRequestsApproveCall) Fields

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

func (*ProjectsApprovalRequestsApproveCall) Header

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

type ProjectsApprovalRequestsDismissCall

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

func (*ProjectsApprovalRequestsDismissCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsApprovalRequestsDismissCall) Do

Do executes the "accessapproval.projects.approvalRequests.dismiss" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*ProjectsApprovalRequestsDismissCall) Fields

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

func (*ProjectsApprovalRequestsDismissCall) Header

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

type ProjectsApprovalRequestsGetCall

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

func (*ProjectsApprovalRequestsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsApprovalRequestsGetCall) Do

Do executes the "accessapproval.projects.approvalRequests.get" call. Exactly one of *ApprovalRequest or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ApprovalRequest.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 (*ProjectsApprovalRequestsGetCall) Fields

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

func (*ProjectsApprovalRequestsGetCall) Header

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

func (*ProjectsApprovalRequestsGetCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type ProjectsApprovalRequestsListCall

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

func (*ProjectsApprovalRequestsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsApprovalRequestsListCall) Do

Do executes the "accessapproval.projects.approvalRequests.list" call. Exactly one of *ListApprovalRequestsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListApprovalRequestsResponse.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 (*ProjectsApprovalRequestsListCall) Fields

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

func (*ProjectsApprovalRequestsListCall) Filter

Filter sets the optional parameter "filter": A filter on the type of approval requests to retrieve. Must be one of the following values: <ol>

<li>[not set]: Requests that are pending or have active

approvals.</li>

<li>ALL: All requests.</li>
<li>PENDING: Only pending requests.</li>
<li>ACTIVE: Only active (i.e. currently approved) requests.</li>
<li>DISMISSED: Only dismissed (including expired)

requests.</li> </ol>

func (*ProjectsApprovalRequestsListCall) Header

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

func (*ProjectsApprovalRequestsListCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*ProjectsApprovalRequestsListCall) PageSize

PageSize sets the optional parameter "pageSize": Requested page size.

func (*ProjectsApprovalRequestsListCall) PageToken

PageToken sets the optional parameter "pageToken": A token identifying the page of results to return.

func (*ProjectsApprovalRequestsListCall) Pages

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 ProjectsApprovalRequestsService

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

func NewProjectsApprovalRequestsService

func NewProjectsApprovalRequestsService(s *Service) *ProjectsApprovalRequestsService

func (*ProjectsApprovalRequestsService) Approve

Approve: Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*ProjectsApprovalRequestsService) Dismiss

Dismiss: Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

func (*ProjectsApprovalRequestsService) Get

Get: Gets an approval request. Returns NOT_FOUND if the request does not exist.

func (*ProjectsApprovalRequestsService) List

List: Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

type ProjectsDeleteAccessApprovalSettingsCall

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

func (*ProjectsDeleteAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsDeleteAccessApprovalSettingsCall) Do

Do executes the "accessapproval.projects.deleteAccessApprovalSettings" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.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 (*ProjectsDeleteAccessApprovalSettingsCall) Fields

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

func (*ProjectsDeleteAccessApprovalSettingsCall) Header

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

type ProjectsGetAccessApprovalSettingsCall

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

func (*ProjectsGetAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsGetAccessApprovalSettingsCall) Do

Do executes the "accessapproval.projects.getAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*ProjectsGetAccessApprovalSettingsCall) Fields

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

func (*ProjectsGetAccessApprovalSettingsCall) Header

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

func (*ProjectsGetAccessApprovalSettingsCall) IfNoneMatch

IfNoneMatch sets the 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. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type ProjectsService

type ProjectsService struct {
	ApprovalRequests *ProjectsApprovalRequestsService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

func (*ProjectsService) DeleteAccessApprovalSettings

func (r *ProjectsService) DeleteAccessApprovalSettings(name string) *ProjectsDeleteAccessApprovalSettingsCall

DeleteAccessApprovalSettings: Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

func (*ProjectsService) GetAccessApprovalSettings

func (r *ProjectsService) GetAccessApprovalSettings(name string) *ProjectsGetAccessApprovalSettingsCall

GetAccessApprovalSettings: Gets the settings associated with a project, folder, or organization.

func (*ProjectsService) UpdateAccessApprovalSettings

func (r *ProjectsService) UpdateAccessApprovalSettings(name string, accessapprovalsettings *AccessApprovalSettings) *ProjectsUpdateAccessApprovalSettingsCall

UpdateAccessApprovalSettings: Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

type ProjectsUpdateAccessApprovalSettingsCall

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

func (*ProjectsUpdateAccessApprovalSettingsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*ProjectsUpdateAccessApprovalSettingsCall) Do

Do executes the "accessapproval.projects.updateAccessApprovalSettings" call. Exactly one of *AccessApprovalSettings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *AccessApprovalSettings.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 (*ProjectsUpdateAccessApprovalSettingsCall) Fields

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

func (*ProjectsUpdateAccessApprovalSettingsCall) Header

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

func (*ProjectsUpdateAccessApprovalSettingsCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/goog le.protobuf#fieldmask If this field is left unset, only the notification_emails field will be updated.

type ResourceProperties

type ResourceProperties struct {
	// ExcludesDescendants: Whether an approval will exclude the descendants
	// of the resource being
	// requested.
	ExcludesDescendants bool `json:"excludesDescendants,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ExcludesDescendants")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ExcludesDescendants") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ResourceProperties: The properties associated with the resource of the request.

func (*ResourceProperties) MarshalJSON

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

type Service

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

	Folders *FoldersService

	Organizations *OrganizationsService

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New deprecated

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL