github.com/openshift-online/ocm-sdk-go@v0.1.473/authorizations/v1/root_client.go (about) 1 /* 2 Copyright (c) 2020 Red Hat, Inc. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all 18 // your changes will be lost when the file is generated again. 19 20 package v1 // github.com/openshift-online/ocm-sdk-go/authorizations/v1 21 22 import ( 23 "net/http" 24 "path" 25 ) 26 27 // Client is the client of the 'root' resource. 28 // 29 // Root of the tree of resources of the authorization service. 30 type Client struct { 31 transport http.RoundTripper 32 path string 33 } 34 35 // NewClient creates a new client for the 'root' 36 // resource using the given transport to send the requests and receive the 37 // responses. 38 func NewClient(transport http.RoundTripper, path string) *Client { 39 return &Client{ 40 transport: transport, 41 path: path, 42 } 43 } 44 45 // Creates a new request for the method that retrieves the metadata. 46 func (c *Client) Get() *MetadataRequest { 47 return &MetadataRequest{ 48 transport: c.transport, 49 path: c.path, 50 } 51 } 52 53 // AccessReview returns the target 'access_review' resource. 54 // 55 // Reference to the resource that is used to submit access review requests. 56 func (c *Client) AccessReview() *AccessReviewClient { 57 return NewAccessReviewClient( 58 c.transport, 59 path.Join(c.path, "access_review"), 60 ) 61 } 62 63 // CapabilityReview returns the target 'capability_review' resource. 64 // 65 // Reference to the resource that is used to submit capability review requests. 66 func (c *Client) CapabilityReview() *CapabilityReviewClient { 67 return NewCapabilityReviewClient( 68 c.transport, 69 path.Join(c.path, "capability_review"), 70 ) 71 } 72 73 // ExportControlReview returns the target 'export_control_review' resource. 74 // 75 // Reference to the resource that is used to submit export control review requests. 76 func (c *Client) ExportControlReview() *ExportControlReviewClient { 77 return NewExportControlReviewClient( 78 c.transport, 79 path.Join(c.path, "export_control_review"), 80 ) 81 } 82 83 // FeatureReview returns the target 'feature_review' resource. 84 // 85 // Reference to the resource that is used to submit feature review requests. 86 func (c *Client) FeatureReview() *FeatureReviewClient { 87 return NewFeatureReviewClient( 88 c.transport, 89 path.Join(c.path, "feature_review"), 90 ) 91 } 92 93 // ResourceReview returns the target 'resource_review' resource. 94 // 95 // Reference to the resource that is used to submit resource review requests. 96 func (c *Client) ResourceReview() *ResourceReviewClient { 97 return NewResourceReviewClient( 98 c.transport, 99 path.Join(c.path, "resource_review"), 100 ) 101 } 102 103 // SelfAccessReview returns the target 'self_access_review' resource. 104 // 105 // Reference to the resource that is used to submit self access review requests. 106 func (c *Client) SelfAccessReview() *SelfAccessReviewClient { 107 return NewSelfAccessReviewClient( 108 c.transport, 109 path.Join(c.path, "self_access_review"), 110 ) 111 } 112 113 // SelfCapabilityReview returns the target 'self_capability_review' resource. 114 // 115 // Reference to the resource that is used to submit self capability review requests. 116 func (c *Client) SelfCapabilityReview() *SelfCapabilityReviewClient { 117 return NewSelfCapabilityReviewClient( 118 c.transport, 119 path.Join(c.path, "self_capability_review"), 120 ) 121 } 122 123 // SelfFeatureReview returns the target 'self_feature_review' resource. 124 // 125 // Reference to the resource that is used to submit self feature review requests. 126 func (c *Client) SelfFeatureReview() *SelfFeatureReviewClient { 127 return NewSelfFeatureReviewClient( 128 c.transport, 129 path.Join(c.path, "self_feature_review"), 130 ) 131 } 132 133 // SelfTermsReview returns the target 'self_terms_review' resource. 134 // 135 // Reference to the resource that is used to submit Red Hat's Terms and Conditions 136 // for using OpenShift Dedicated and Amazon Red Hat OpenShift self-review requests. 137 func (c *Client) SelfTermsReview() *SelfTermsReviewClient { 138 return NewSelfTermsReviewClient( 139 c.transport, 140 path.Join(c.path, "self_terms_review"), 141 ) 142 } 143 144 // TermsReview returns the target 'terms_review' resource. 145 // 146 // Reference to the resource that is used to submit Red Hat's Terms and Conditions 147 // for using OpenShift Dedicated and Amazon Red Hat OpenShift review requests. 148 func (c *Client) TermsReview() *TermsReviewClient { 149 return NewTermsReviewClient( 150 c.transport, 151 path.Join(c.path, "terms_review"), 152 ) 153 }